Page MenuHomeFreeBSD

kvm: Extend feature detection
ClosedPublic

Authored by aokblast on Jul 10 2026, 9:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 5, 8:41 AM
Unknown Object (File)
Sat, Sep 5, 7:12 AM
Unknown Object (File)
Thu, Sep 3, 7:24 PM
Unknown Object (File)
Thu, Sep 3, 6:40 PM
Unknown Object (File)
Thu, Sep 3, 5:32 PM
Unknown Object (File)
Thu, Sep 3, 5:13 PM
Unknown Object (File)
Thu, Sep 3, 7:29 AM
Unknown Object (File)
Tue, Sep 1, 6:00 PM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 74693
Build 71576: arc lint + arc unit