HomeFreeBSD

MFC 273800:

Description

MFC 273800:
Rework virtual machine hypervisor detection.

  • Move the existing code to x86/x86/identcpu.c since it is x86-specific.
  • If the CPUID2_HV flag is set, assume a hypervisor is present and query the 0x40000000 leaf to determine the hypervisor vendor ID. Export the vendor ID and the highest supported hypervisor CPUID leaf via hv_vendor[] and hv_high variables, respectively. The hv_vendor[] array is also exported via the hw.hv_vendor sysctl.
  • Merge the VMWare detection code from tsc.c into the new probe in identcpu.c. Add a VM_GUEST_VMWARE to identify vmware and use that in the TSC code to identify VMWare.

Details

Provenance
jhbAuthored on
Parents
rS278521: Restore ABI compatibility, broken in r273127. Note that while this fixes
Branches
Unknown
Tags
Unknown

Event Timeline