Bhyve Debug Server Enhancements
Student: BojanNovkovic (bojan.novkovic AT kset.org)
Mentor: JohnBaldwin (jhb@)
Bhyve is a modern type 2 hypervisor originally written for FreeBSD. The goal of this project is to enhance the functionality of its debugging server. Several existing features related to single-stepping are tied to Intel-specific VM mechanisms, which severely impairs bhyve's debugging functionality on other platforms. Thus, the first major goal of this project is to rework the single-stepping mechanism to use the RFLAGS.TF VMEXIT mechanism. This will allow bhyve to support debugging guest operating systems on AMD platforms, which would facilitate kernel development for more 64-bit x86 hardware (other than Intel). The second goal is adding support for hardware watchpoints (and optionally hardware breakpoints) using the guest OS's hardware debugging registers. This will improve the kernel development workflow and allow easier and faster fixes for various kernel memory corruption bugs.
- Rework the single-stepping mechanism to support AMD hardware
- Add support for hardware watchpoints
- Add support for hardware breakpoints
- Add support for breakpoint/watchpoint emulation using shadowed EPT entries
Testing is done on an AMD Ryzen 5 5600X and an Intel Core i5-6300U system, both running -CURRENT.