Page MenuHomeFreeBSD

kvm: Extend feature detection
ClosedPublic

Authored by aokblast on Fri, Jul 10, 9:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jul 17, 7:34 AM
Unknown Object (File)
Fri, Jul 17, 6:57 AM
Unknown Object (File)
Thu, Jul 16, 5:39 PM
Unknown Object (File)
Thu, Jul 16, 1:42 AM
Unknown Object (File)
Tue, Jul 14, 8:37 PM
Unknown Object (File)
Mon, Jul 13, 10:26 PM
Unknown Object (File)
Mon, Jul 13, 6:24 PM
Unknown Object (File)
Sun, Jul 12, 9:47 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

Event Timeline

aokblast retitled this revision from kvm: Extend feature detect to kvm: Extend feature detection.

This fixes the kvm_clock detection on a guest on KVM on HyperV.

This revision is now accepted and ready to land.Fri, Jul 10, 10:58 AM
This revision was automatically updated to reflect the committed changes.