Geoff Chappell, Software Analyst
The HviGetHypervisorFeatures function obtains the output of a Microsoft-compatible hypervisor’s cpuid leaf 0x40000003.
VOID HviGetHypervisorFeatures (HV_X64_HYPERVISOR_FEATURES *);
The one argument provides the address of a structure that is to receive the cpuid output.
The HviGetHypervisorFeatures function is exported by name from the kernel in version 10.0 and higher.
The HviGetHypervisorFeatures function is not documented.
If cpuid leaf 1 shows that a hypervisor is present and cpuid leaf 0x40000001 confirms that the hypervisor implements Microsoft’s interface—see HviIsHypervisorMicrosoftCompatible—then the function copies to the given address whatever cpuid leaf 0x40000003 produces in the eax, ebx, ecx and edx registers.
Otherwise, the structure at the given address is zeroed.