Page MenuHomeFreeBSD

kvm: Extend feature detection
ClosedPublic

Authored by aokblast on Jul 10 2026, 9:25 AM.
Tags
None
Referenced Files
F165847218: D58146.diff
Mon, Aug 10, 5:44 AM
F165841513: D58146.id181683.diff
Mon, Aug 10, 4:29 AM
Unknown Object (File)
Sun, Aug 9, 12:27 PM
Unknown Object (File)
Sat, Aug 8, 11:04 PM
Unknown Object (File)
Fri, Aug 7, 8:35 PM
Unknown Object (File)
Sun, Aug 2, 4:01 AM
Unknown Object (File)
Sun, Aug 2, 1:29 AM
Unknown Object (File)
Sun, Jul 26, 6:34 AM
Subscribers

Details

Summary

KVM does not always use 0x40000000 as its CPUID base. For example, QEMU
adds a 0x100 offset when nested virtualization is detected and the host
exposes Hyper-V enlightenment hints. To accommodate this behavior,
switch the detection logic to use the CPUID leaf returned by do_cpuid(),
making the implementation more flexible.

See:
https://github.com/qemu/qemu/blob/master/target/i386/kvm/kvm.c#L2300

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable