HV_X64_ENLIGHTENMENT_INFORMATION

The HV_X64_ENLIGHTENMENT_INFORMATION structure collects the flags that a Microsoft-compatible hypervisor’s cpuid leaf 0x40000004 produces in the eax, ebx, ecx and edx registers.

Availability

The HV_X64_ENLIGHTENMENT_INFORMATION is defined for Windows 10. Earlier versions have an HV_ENLIGHTENMENT_INFORMATION. The new name suggests a specialisation to one processor architecture, yet the the structure appears to be defined for both 32-bit and 64-bit Windows.

Documentation Status

The HV_X64_ENLIGHTENMENT_INFORMATION is not documented. Some of its members, having previously been defined in the MsHvFeatures member of the HV_CPUID_RESULT union, are documented in the Windows Driver Kit (WDK) for Windows 7, which also provided a C-language definition in the HVGDK.H header file.

The structure anyway repackages material that Microsoft does document—or represents as documented—in the Hypervisor Top-Level Functional Specification. If the structure or its members’ previous definitions have become undocumented, it may be just that Microsoft regards the structure as no more than a convenience for Microsoft’s own programming in the loader and kernel, if not in the hypervisor itself. That said, the Specification that is offered today (12th November 2016) as the most recent version is a PDF that is three years old. Despite the Microsoft Open Specification Promise, flags that have been added since, notably for Windows 10, seem not yet to be documented anywhere in any sense.

Layout

The HV_X64_ENLIGHTENMENT_INFORMATION is 0x10 bytes. Names and definitions below are from symbol files for URLMON.DLL in Windows 10. Well might you wonder what URLMON.DLL has to do with the hypervisor such that its symbol files have type information for this structure but the kernel’s don’t!

Offset Definition
0x00
UINT UseHypercallForAddressSpaceSwitch : 1;     // 0x00000001 (6.1)
UINT UseHypercallForLocalFlush : 1;             // 0x00000002 (6.1)
UINT UseHypercallForRemoteFlush : 1;            // 0x00000004 (6.1)
UINT UseApicMsrs : 1;                           // 0x00000008 (6.1)
UINT UseHvRegisterForReset : 1;                 // 0x00000010 (6.1)
UINT UseRelaxedTiming : 1;                      // 0x00000020 (6.1)
UINT UseDmaRemapping : 1;                       // 0x00000040 (6.2)
UINT UseInterruptRemapping : 1;                 // 0x00000080 (6.2)
UINT UseX2ApicMsrs : 1;                         // 0x00000100 (6.2)
UINT DeprecateAutoEoi : 1;                      // 0x00000200 (6.2)
UINT UseSyntheticCluserIpi : 1;                 // 0x00000400
UINT UseExProcessorMasks : 1;                   // 0x00000800
UINT Reserved : 20;
0x04
UINT LongSpinWaitCount;                         // (6.1)
0x08
UINT ReservedEcx;
0x0C
UINT ReservedEdx;

Version numbers in parentheses date each member’s introduction, as known from prior appearance in the HV_ENLIGHTENMENT_INFORMATION or in the even older HV_CPUID_RESULT.