CPUID functions 0x40000100 and above mirror the original contents of
the hypervisor CPUID functions at 0x40000000. This allows a guest to
query the real hypervisor signature and features when the the default
hypervisor functions at 0x40000000 have been overridden to identify
as something else, such as KVM or HyperV.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 78611 Build 75494: arc lint + arc unit
Event Timeline
Comment Actions
+1 from a user of this layout: keelOS does exactly this for its Hyper-V enlightenments (0x40000000-0x4000000A become Hyper-V's, bhyve's own leaves move to 0x40000100/0x40000101). It is the convention KVM uses as well (KVM_CPUID_SIGNATURE_NEXT = 0x40000100), and a FreeBSD guest's identify_hypervisor_cpuid_base() already walks the bases in 0x100 steps, so it finds bhyve either way. Works for us with FreeBSD, Linux and Windows guests.
Comment Actions
LGTM, but are there other places in the kernel that should now know about the new offset?
Comment Actions
I done goofed and accepted this as bhyve. Please wait for one of the others to weigh in as well.