HomeFreeBSD

Rework virtual machine hypervisor detection.

Description

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.

Differential Revision: https://reviews.freebsd.org/D1010
Reviewed by: delphij, jkim, neel

Details

Provenance
jhbAuthored on
Reviewer
delphij
Differential Revision
D1010: Rework hypervisor detection.
Parents
rS273799: Make the GPIO children attach to the first unit available and not only to
Branches
Loading...
Tags
Loading...

Event Timeline