HV_X64_PLATFORM_CAPABILITIES

The HV_X64_PLATFORM_CAPABILITIES collects the flags that a Microsoft-compatible hypervisor is to produce in the eax, ebx, ecx and edx registers as output for some unknown leaf of the cpuid instruction. Or so it seems reasonable to infer. The HV_CPUID_RESULT union that Microsoft defined in the Windows Driver Kit (WDK) for Windows 7 was at least intended originally for all the cpuid leaves that matter to the hypervisor. This union’s version for Windows 10 has one member of type HV_X64_PLATFORM_CAPABILITIES but the Windows kernel, anyway, does not execute any cpuid leaf that produces these flags.

Documentation Status

The HV_X64_PLATFORM_CAPABILITIES is not documented. The hypervisor’s cpuid implementation is documented in the Hypervisor Top-Level Functional Specification, which Microsoft provides under the Microsoft Open Specification Promise. What’s offered there today (12th November 2016) as the specification’s most recent version is a PDF that is three years old and extends only to leaf 0x40000006.

Layout

The HV_X64_PLATFORM_CAPABILITIES is 0x10 bytes. Formally, the HV_X64_PLATFORM_CAPABILITIES is a 16-byte union to ease the accessing of all flags together:

union {
    UINT64 AsUINT64 [2];
    struct {
        /*  bit fields, see below  */
    };
};

What counts are the bits. There are already many. The masks and definitions below are from type information in symbol files for URLMON.DLL in Windows 10. Of all the symbol files that Microsoft publishes for Windows 10, only those for URLMON.DLL have type information for HV_X64_PLATFORM_CAPABILITIES or even of the HV_CPUID_RESULT union that the former is used in.

Offset Definition
0x00
UINT AllowRedSignedCode : 1;                // 0x00000001
UINT AllowKernelModeDebugging : 1;          // 0x00000002
UINT AllowUserModeDebugging : 1;            // 0x00000004
UINT AllowTelnetServer : 1;                 // 0x00000008
UINT AllowIOPorts : 1;                      // 0x00000010
UINT AllowFullMsrSpace : 1;                 // 0x00000020
UINT AllowPerfCounters : 1;                 // 0x00000040
UINT AllowHost512MB : 1;                    // 0x00000080
UINT ReservedEax1 : 1;
UINT AllowRemoteRecovery : 1;               // 0x00000200
UINT AllowStreaming : 1;                    // 0x00000400
UINT AllowPushDeployment : 1;               // 0x00000800
UINT AllowPullDeployment : 1;               // 0x00001000
UINT AllowProfiling : 1;                    // 0x00002000
UINT AllowJsProfiling : 1;                  // 0x00004000
UINT AllowCrashDump : 1;                    // 0x00008000 
UINT AllowVsCrashDump : 1;                  // 0x00010000
UINT AllowToolFileIO : 1;                   // 0x00020000
UINT AllowConsoleMgmt : 1;                  // 0x00040000
UINT AllowTracing : 1;                      // 0x00080000
UINT AllowXStudio : 1;                      // 0x00100000
UINT AllowGestureBuilder : 1;               // 0x00200000
UINT AllowSpeechLab : 1;                    // 0x00400000
UINT AllowSmartglassStudio : 1;             // 0x00800000
UINT AllowNetworkTools : 1;                 // 0x01000000
UINT AllowTcrTool : 1                       // 0x02000000
UINT AllowHostNetworkStack : 1;             // 0x04000000
UINT AllowSystemUpdateTest : 1;             // 0x08000000
UINT AllowOffChipPerfCtrStreaming : 1;      // 0x10000000
UINT AllowToolingMemory : 1;                // 0x20000000
UINT AllowSystemDowngrade : 1;              // 0x40000000
UINT AllowGreenDiskLicenses : 1;            // 0x80000000
0x04
UINT IsLiveConnected : 1;                   // 0x00000001
UINT IsMteBoosted : 1;                      // 0x00000002
UINT IsQaSlt : 1;                           // 0x00000004
UINT IsStockImage : 1;                      // 0x00000008
UINT IsMsTestLab : 1;                       // 0x00000010
UINT IsRetailDebugger : 1;                  // 0x00000020
UINT IsXvdSort : 1;                         // 0x00000040
UINT IsGreenDebug : 1;                      // 0x00000080
UINT IsHwDevTest : 1;                       // 0x00000100
UINT ReservedEbx : 23;
0x08
UINT ReservedEcx;
0x0C
UINT ReservedEdx : 31;
UINT UseAlternateXvd : 1;                   // 0x80000000