HviGetHardwareFeatures

The HviGetHardwareFeatures function obtains the output of a Microsoft-compatible hypervisor’s cpuid leaf 0x40000006.

Declaration

VOID HviGetHardwareFeatures (HV_X64_HYPERVISOR_HARDWARE_FEATURES *);

Parameters

The one argument provides the address of a structure that is to receive the cpuid output.

Availability

The HviGetHardwareFeatures function is exported by name from the kernel in version 10.0 and higher.

Documentation Status

The HviGetHardwareFeatures function is not documented.

Behaviour

If cpuid leaf 1 shows that a hypervisor is present and cpuid leaf 0x40000000 confirms that the hypervisor implements cpuid leaves at least to 0x40000006—see HviGetHypervisorVendorAndMaxFunction—then the function copies to the given address whatever cpuid leaf 0x40000006 produces in the eax, ebx, ecx and edx registers.

Otherwise, the structure at the given address is zeroed.

It is here thought, rightly or wrongly, that although this function does not check that the hypervisor is Microsoft-compatible, it is meant to.