bhyve has no IA32_DEBUGCTL for its guests: reading it is #GP. A
hypervisor saves and restores the MSR around its guests. Linux's KVM
logs the #GP once and goes on; the vmm of FreeBSD does not expect it,
and a FreeBSD guest panics in vmx_run() when it starts a guest of its
own.
With nested VMX on, the MSR reads as zero and can be written with
zero. None of its features is offered.
AI assistance: as D61708, this change was developed with an AI assistant (Anthropic's Claude) under my direction. The assistant wrote the code and this description. The tests in the test plan were run on real hardware.
Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com>
Sponsored by: keelos.dev