Index: trunk/src/VBox/VMM/VMMR3/GICR3Nem-win.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/GICR3Nem-win.cpp	(revision 108396)
+++ trunk/src/VBox/VMM/VMMR3/GICR3Nem-win.cpp	(revision 108398)
@@ -33,4 +33,5 @@
 #include <iprt/nt/nt-and-windows.h>
 #include <iprt/nt/hyperv.h>
+#include <iprt/mem.h>
 #include <WinHvPlatform.h>
 
@@ -54,4 +55,6 @@
 *   Defined Constants And Macros                                                                                                 *
 *********************************************************************************************************************************/
+/** The current GIC saved state version. */
+#define GIC_NEM_SAVED_STATE_VERSION               1
 
 
@@ -110,8 +113,78 @@
 
 
+typedef struct MY_WHV_INTERRUPT_STATE
+{
+    uint8_t                         fState;
+    uint8_t                         bIPriorityCfg;
+    uint8_t                         bIPriorityActive;
+    uint8_t                         bRsvd0;
+} MY_WHV_INTERRUPT_STATE;
+AssertCompileSize(MY_WHV_INTERRUPT_STATE, sizeof(uint32_t));
+
+#define WHV_INTERRUPT_STATE_F_ENABLED           RT_BIT(0)
+#define WHV_INTERRUPT_STATE_F_EDGE_TRIGGERED    RT_BIT(1)
+#define WHV_INTERRUPT_STATE_F_ASSERTED          RT_BIT(2)
+#define WHV_INTERRUPT_STATE_F_SET_PENDING       RT_BIT(3)
+#define WHV_INTERRUPT_STATE_F_ACTIVE            RT_BIT(4)
+#define WHV_INTERRUPT_STATE_F_DIRECT            RT_BIT(5)
+
+
+typedef struct MY_WHV_GLOBAL_INTERRUPT_STATE
+{
+    uint32_t                        u32IntId;
+    uint32_t                        idActiveVp;
+    uint32_t                        u32TargetMpidrOrVpIndex;
+    MY_WHV_INTERRUPT_STATE          State;
+} MY_WHV_GLOBAL_INTERRUPT_STATE;
+AssertCompileSize(MY_WHV_GLOBAL_INTERRUPT_STATE, 4 * sizeof(uint32_t));
+
+
+typedef struct MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE
+{
+    uint8_t                         bVersion;
+    uint8_t                         bGicVersion;
+    uint8_t                         abPad[2];
+
+    uint32_t                        cInterrupts;
+    uint64_t                        u64RegGicdCtrlEnableGrp1A;
+
+    MY_WHV_GLOBAL_INTERRUPT_STATE   aSpis[1]; /* Flexible */
+} MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE;
+AssertCompileSize(MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE, 2 * sizeof(uint32_t) + sizeof(uint64_t) + sizeof(MY_WHV_GLOBAL_INTERRUPT_STATE));
+
+#define MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE_VERSION 1
+
+
+typedef struct MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE
+{
+    uint8_t                         bVersion;
+    uint8_t                         bGicVersion;
+    uint8_t                         abPad[6];
+
+    uint64_t                        u64RegIccIGrpEn1El1;
+    uint64_t                        u64RegGicrCtrlEnableLpis;
+    uint64_t                        u64RegIccBprEl1;
+    uint64_t                        u64RegIccPmrEl1;
+    uint64_t                        u64RegGicrPropBase;
+    uint64_t                        u64RegGicrPendBase;
+
+    uint32_t                        au32RegIchAp1REl2[4];
+
+    MY_WHV_INTERRUPT_STATE          aPpiStates[32];
+} MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE;
+AssertCompileSize(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, 7 * sizeof(uint64_t) + 4 * sizeof(uint32_t) + 32 * sizeof(MY_WHV_INTERRUPT_STATE));
+
+#define MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE_VERSION 1
+
+#define MY_WHV_VIRTUAL_PROCESSOR_STATE_TYPE_LOCAL_INTERRUPT_CTRL  (WHV_VIRTUAL_PROCESSOR_STATE_TYPE)0x00001000
+#define MY_WHV_VIRTUAL_PROCESSOR_STATE_TYPE_GLOBAL_INTERRUPT_CTRL (WHV_VIRTUAL_PROCESSOR_STATE_TYPE)0x00001003
+
+
 /*********************************************************************************************************************************
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
-extern decltype(WHvRequestInterrupt) *  g_pfnWHvRequestInterrupt;
+extern decltype(WHvGetVirtualProcessorState) * g_pfnWHvGetVirtualProcessorState;
+extern decltype(WHvSetVirtualProcessorState) * g_pfnWHvSetVirtualProcessorState;
+extern decltype(WHvRequestInterrupt) *         g_pfnWHvRequestInterrupt;
 
 /*
@@ -119,6 +192,87 @@
  */
 #ifndef IN_SLICKEDIT
-# define WHvRequestInterrupt                        g_pfnWHvRequestInterrupt
+# define WHvGetVirtualProcessorState           g_pfnWHvGetVirtualProcessorState
+# define WHvSetVirtualProcessorState           g_pfnWHvSetVirtualProcessorState
+# define WHvRequestInterrupt                   g_pfnWHvRequestInterrupt
 #endif
+
+
+/** Saved state field descriptors for the global interrupt state. */
+static const SSMFIELD g_aWHvGicGlobalInterruptState[] =
+{
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_STATE, u32IntId),
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_STATE, idActiveVp),
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_STATE, u32TargetMpidrOrVpIndex),
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_STATE, State.fState),
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_STATE, State.bIPriorityCfg),
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_STATE, State.bIPriorityActive),
+    SSMFIELD_ENTRY_TERM()
+};
+
+
+/** Saved state field descriptors for the global GIC state (sans the flexible interrupts array. */
+static const SSMFIELD g_aWHvGicGlobalState[] =
+{
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE, bGicVersion),
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE, cInterrupts),
+    SSMFIELD_ENTRY(MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE, u64RegGicdCtrlEnableGrp1A),
+    SSMFIELD_ENTRY_TERM()
+};
+
+
+#define GIC_NEM_HV_PPI_STATE(a_idx) \
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, aPpiStates[a_idx].fState), \
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, aPpiStates[a_idx].bIPriorityCfg), \
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, aPpiStates[a_idx].bIPriorityActive)
+
+
+/** Saved state field descriptors for the local interrupt controller state. */
+static const SSMFIELD g_aWHvGicLocalInterruptState[] =
+{
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, bGicVersion),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, u64RegIccIGrpEn1El1),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, u64RegGicrCtrlEnableLpis),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, u64RegIccBprEl1),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, u64RegIccPmrEl1),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, u64RegGicrPropBase),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, u64RegGicrPendBase),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, au32RegIchAp1REl2[0]),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, au32RegIchAp1REl2[1]),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, au32RegIchAp1REl2[2]),
+    SSMFIELD_ENTRY(MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE, au32RegIchAp1REl2[3]),
+    GIC_NEM_HV_PPI_STATE(0),
+    GIC_NEM_HV_PPI_STATE(1),
+    GIC_NEM_HV_PPI_STATE(2),
+    GIC_NEM_HV_PPI_STATE(3),
+    GIC_NEM_HV_PPI_STATE(4),
+    GIC_NEM_HV_PPI_STATE(5),
+    GIC_NEM_HV_PPI_STATE(6),
+    GIC_NEM_HV_PPI_STATE(7),
+    GIC_NEM_HV_PPI_STATE(8),
+    GIC_NEM_HV_PPI_STATE(9),
+    GIC_NEM_HV_PPI_STATE(10),
+    GIC_NEM_HV_PPI_STATE(11),
+    GIC_NEM_HV_PPI_STATE(12),
+    GIC_NEM_HV_PPI_STATE(13),
+    GIC_NEM_HV_PPI_STATE(14),
+    GIC_NEM_HV_PPI_STATE(15),
+    GIC_NEM_HV_PPI_STATE(16),
+    GIC_NEM_HV_PPI_STATE(17),
+    GIC_NEM_HV_PPI_STATE(18),
+    GIC_NEM_HV_PPI_STATE(19),
+    GIC_NEM_HV_PPI_STATE(20),
+    GIC_NEM_HV_PPI_STATE(21),
+    GIC_NEM_HV_PPI_STATE(22),
+    GIC_NEM_HV_PPI_STATE(23),
+    GIC_NEM_HV_PPI_STATE(24),
+    GIC_NEM_HV_PPI_STATE(25),
+    GIC_NEM_HV_PPI_STATE(26),
+    GIC_NEM_HV_PPI_STATE(27),
+    GIC_NEM_HV_PPI_STATE(28),
+    GIC_NEM_HV_PPI_STATE(29),
+    GIC_NEM_HV_PPI_STATE(30),
+    GIC_NEM_HV_PPI_STATE(31),
+    SSMFIELD_ENTRY_TERM()
+};
 
 
@@ -199,4 +353,181 @@
 
 /**
+ * @copydoc FNSSMDEVSAVEEXEC
+ */
+static DECLCALLBACK(int) gicR3HvSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
+{
+    PGICHVDEV       pThis = PDMDEVINS_2_DATA(pDevIns, PGICHVDEV);
+    PVM             pVM   = PDMDevHlpGetVM(pDevIns);
+    PCPDMDEVHLPR3   pHlp  = pDevIns->pHlpR3;
+
+    AssertReturn(pVM, VERR_INVALID_VM_HANDLE);
+
+    LogFlowFunc(("Enter\n"));
+
+    /*
+     * Save the global interrupt state first.
+     */
+    /** @todo The saved state is not final because it would be great if we could have
+     *        a compatible saved state format between all possible GIC variants (no idea whether this is feasible).
+     */
+    uint32_t cbWritten = 0;
+    HRESULT hrc = WHvGetVirtualProcessorState(pThis->hPartition, WHV_ANY_VP, MY_WHV_VIRTUAL_PROCESSOR_STATE_TYPE_GLOBAL_INTERRUPT_CTRL,
+                                              NULL, 0, &cbWritten);
+    AssertLogRelMsgReturn(hrc == WHV_E_INSUFFICIENT_BUFFER,
+                          ("WHvGetVirtualProcessorState(%p, WHV_ANY_VP, WHvVirtualProcessorStateTypeGlobalInterruptState,) -> %Rhrc (Last=%#x/%u)\n",
+                           pVM->nem.s.hPartition, hrc, RTNtLastStatusValue(), RTNtLastErrorValue())
+                          , VERR_NEM_GET_REGISTERS_FAILED);
+
+    /* Allocate a buffer to write the whole state to based on the amount of interrupts indicated. */
+    uint32_t const cbState = cbWritten;
+    MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE *pState = (MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE *)RTMemTmpAllocZ(cbState);
+    AssertLogRelMsgReturn(pState, ("Allocating %u bytes of memory for the global interrupt state buffer failed\n", cbState),
+                          VERR_NO_MEMORY);
+
+    hrc = WHvGetVirtualProcessorState(pThis->hPartition, WHV_ANY_VP, MY_WHV_VIRTUAL_PROCESSOR_STATE_TYPE_GLOBAL_INTERRUPT_CTRL,
+                                      pState, cbState, &cbWritten);
+    AssertLogRelMsg(SUCCEEDED(hrc),
+                    ("WHvGetVirtualProcessorState(%p, WHV_ANY_VP, WHvVirtualProcessorStateTypeGlobalInterruptState, %p, %u) -> %Rhrc (Last=%#x/%u)\n",
+                    pVM->nem.s.hPartition, pState, cbState, hrc, RTNtLastStatusValue(), RTNtLastErrorValue()));
+    AssertLogRelMsgReturn(cbWritten == cbState,
+                          ("WHvGetVirtualProcessorState(%p, WHV_ANY_VP, WHvVirtualProcessorStateTypeGlobalInterruptState,) -> cbWritten=%u vs expected=%u\n",
+                           pVM->nem.s.hPartition, cbWritten, cbState);
+                          , VERR_NEM_GET_REGISTERS_FAILED);
+    AssertLogRelMsgReturn(pState->bVersion == MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE_VERSION,
+                          ("WHvGetVirtualProcessorState(%p, WHV_ANY_VP, WHvVirtualProcessorStateTypeGlobalInterruptState,) -> bVersion=%u vs expected=%u\n",
+                           pVM->nem.s.hPartition, pState->bVersion, MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE_VERSION);
+                          , VERR_NEM_GET_REGISTERS_FAILED); 
+
+    if (SUCCEEDED(hrc))
+    {
+        pHlp->pfnSSMPutStruct(pSSM, (const void *)pState, &g_aWHvGicGlobalState[0]);
+        for (uint32_t i = 0; i < pState->cInterrupts; i++)
+            pHlp->pfnSSMPutStruct(pSSM, (const void *)&pState->aSpis[i], &g_aWHvGicGlobalInterruptState[0]);
+    }
+
+    RTMemTmpFree(pState);
+    if (FAILED(hrc))
+        return VERR_NEM_GET_REGISTERS_FAILED;
+
+    /*
+     * Now for the local interrupt state for each vCPU.
+     */
+    for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
+    {
+        MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE LocalState;
+
+        hrc = WHvGetVirtualProcessorState(pThis->hPartition, idCpu, MY_WHV_VIRTUAL_PROCESSOR_STATE_TYPE_LOCAL_INTERRUPT_CTRL,
+                                          &LocalState, sizeof(LocalState), &cbWritten);
+        AssertLogRelMsgReturn(SUCCEEDED(hrc),
+                              ("WHvGetVirtualProcessorState(%p, WHV_ANY_VP, WHvVirtualProcessorStateTypeInterruptControllerState2,) -> %Rhrc (Last=%#x/%u)\n",
+                               pVM->nem.s.hPartition, hrc, RTNtLastStatusValue(), RTNtLastErrorValue())
+                              , VERR_NEM_GET_REGISTERS_FAILED);
+        AssertLogRelMsgReturn(cbWritten == sizeof(LocalState),
+                              ("WHvGetVirtualProcessorState(%p, WHV_ANY_VP, WHvVirtualProcessorStateTypeInterruptControllerState2,) -> cbWritten=%u vs expected=%u\n",
+                               pVM->nem.s.hPartition, cbWritten, sizeof(LocalState));
+                              , VERR_NEM_GET_REGISTERS_FAILED);
+        AssertLogRelMsgReturn(LocalState.bVersion == MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE_VERSION,
+                              ("WHvGetVirtualProcessorState(%p, %u, WHvVirtualProcessorStateTypeInterruptControllerState2,) -> bVersion=%u vs expected=%u\n",
+                               pVM->nem.s.hPartition, idCpu, LocalState.bVersion, MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE_VERSION);
+                              , VERR_NEM_GET_REGISTERS_FAILED);  
+
+        pHlp->pfnSSMPutStruct(pSSM, (const void *)&LocalState, &g_aWHvGicLocalInterruptState[0]);
+
+        /*
+         * Check that we're still good wrt restored data.
+         */
+        int rc = pHlp->pfnSSMHandleGetStatus(pSSM);
+        AssertRCReturn(rc, rc);
+    }
+
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * @copydoc FNSSMDEVLOADEXEC
+ */
+static DECLCALLBACK(int) gicR3HvLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
+{
+    PGICHVDEV       pThis = PDMDEVINS_2_DATA(pDevIns, PGICHVDEV);
+    PVM             pVM   = PDMDevHlpGetVM(pDevIns);
+    PCPDMDEVHLPR3   pHlp  = pDevIns->pHlpR3;
+
+    AssertReturn(pVM, VERR_INVALID_VM_HANDLE);
+    AssertReturn(uPass == SSM_PASS_FINAL, VERR_WRONG_ORDER);
+
+    LogFlowFunc(("uVersion=%u uPass=%#x\n", uVersion, uPass));
+
+    /* Weed out invalid versions. */
+    if (uVersion != GIC_NEM_SAVED_STATE_VERSION)
+    {
+        LogRel(("GIC: gicR3HvLoadExec: Invalid/unrecognized saved-state version %u (%#x)\n", uVersion, uVersion));
+        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
+    }
+
+    /*
+     * Restore the global state.
+     */
+    MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE GlobalState; RT_ZERO(GlobalState);
+    int rc = pHlp->pfnSSMGetStruct(pSSM, &GlobalState, &g_aWHvGicGlobalState[0]);
+    AssertRCReturn(rc, rc);
+
+    if (GlobalState.cInterrupts >= _64K) /* Interrupt IDs are 16-bit. */
+        return VERR_INVALID_PARAMETER;
+
+    /* Calculate size of the final buffer and allocate. */
+    uint32_t const cbState = RT_UOFFSETOF_DYN(MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE, aSpis[GlobalState.cInterrupts]);
+    MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE *pState = (MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE *)RTMemTmpAllocZ(cbState);
+    AssertLogRelMsgReturn(pState, ("Allocating %u bytes of memory for the global interrupt state buffer failed\n", cbState),
+                          VERR_NO_MEMORY);
+
+    pState->bVersion                  = MY_WHV_GLOBAL_INTERRUPT_CONTROLLER_STATE_VERSION;
+    pState->bGicVersion               = GlobalState.bGicVersion;
+    pState->cInterrupts               = GlobalState.cInterrupts;
+    pState->u64RegGicdCtrlEnableGrp1A = GlobalState.u64RegGicdCtrlEnableGrp1A;
+    for (uint32_t i = 0; i < pState->cInterrupts; i++)
+    {
+        rc = pHlp->pfnSSMGetStruct(pSSM, &pState->aSpis[i], &g_aWHvGicGlobalInterruptState[0]);
+        if (RT_FAILURE(rc))
+            break;
+    }
+    AssertRCReturnStmt(rc, RTMemTmpFree(pState), rc);
+
+    HRESULT hrc = WHvSetVirtualProcessorState(pThis->hPartition, WHV_ANY_VP, MY_WHV_VIRTUAL_PROCESSOR_STATE_TYPE_GLOBAL_INTERRUPT_CTRL,
+                                              pState, cbState);
+    RTMemTmpFree(pState);
+    pState = NULL;
+
+    AssertLogRelMsgReturn(SUCCEEDED(hrc),
+                          ("WHvSetVirtualProcessorState(%p, WHV_ANY_VP, WHvVirtualProcessorStateTypeGlobalInterruptState,,%u) -> %Rhrc (Last=%#x/%u)\n",
+                           pVM->nem.s.hPartition, cbState, hrc, RTNtLastStatusValue(), RTNtLastErrorValue())
+                          , VERR_NEM_SET_REGISTERS_FAILED);
+
+    /*
+     * Restore per CPU state.
+     */
+    for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
+    {
+        MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE LocalState;
+        RT_ZERO(LocalState);
+
+        rc = pHlp->pfnSSMGetStruct(pSSM, &LocalState, &g_aWHvGicLocalInterruptState[0]);
+        AssertRCReturn(rc, rc);
+
+        LocalState.bVersion = MY_WHV_LOCAL_INTERRUPT_CONTROLLER_STATE_VERSION;
+
+        hrc = WHvSetVirtualProcessorState(pThis->hPartition, idCpu, MY_WHV_VIRTUAL_PROCESSOR_STATE_TYPE_LOCAL_INTERRUPT_CTRL,
+                                          &LocalState, sizeof(LocalState));
+        AssertLogRelMsgReturn(SUCCEEDED(hrc),
+                              ("WHvSetVirtualProcessorState(%p, %u, WHvVirtualProcessorStateTypeInterruptControllerState2,) -> %Rhrc (Last=%#x/%u)\n",
+                               pVM->nem.s.hPartition, idCpu, hrc, RTNtLastStatusValue(), RTNtLastErrorValue())
+                              , VERR_NEM_SET_REGISTERS_FAILED);
+    }
+
+    return VINF_SUCCESS;
+}
+
+
+/**
  * @interface_method_impl{PDMDEVREG,pfnReset}
  */
@@ -278,4 +609,10 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Failed to get the \"RedistributorMmioBase\" value"));
+
+    /*
+     * Register saved state callbacks.
+     */
+    rc = PDMDevHlpSSMRegister(pDevIns, GIC_NEM_SAVED_STATE_VERSION, 0 /*cbGuess*/, gicR3HvSaveExec, gicR3HvLoadExec);
+    AssertRCReturn(rc, rc);
 
     gicR3HvReset(pDevIns);
Index: trunk/src/VBox/VMM/VMMR3/NEMR3Native-win-armv8.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/NEMR3Native-win-armv8.cpp	(revision 108396)
+++ trunk/src/VBox/VMM/VMMR3/NEMR3Native-win-armv8.cpp	(revision 108398)
@@ -198,6 +198,6 @@
 static decltype(WHvSuspendPartitionTime) *          g_pfnWHvSuspendPartitionTime;
 static decltype(WHvResumePartitionTime) *           g_pfnWHvResumePartitionTime;
-
-//static decltype(WHvGetVirtualProcessorState) *      g_pfnWHvGetVirtualProcessorState;
+decltype(WHvGetVirtualProcessorState) *             g_pfnWHvGetVirtualProcessorState;
+decltype(WHvSetVirtualProcessorState) *             g_pfnWHvSetVirtualProcessorState;
 decltype(WHvRequestInterrupt) *                     g_pfnWHvRequestInterrupt;
 /** @} */
@@ -238,5 +238,6 @@
     NEM_WIN_IMPORT(0, false, WHvSuspendPartitionTime),
     NEM_WIN_IMPORT(0, false, WHvResumePartitionTime),
-//    NEM_WIN_IMPORT(0, false, WHvGetVirtualProcessorState),
+    NEM_WIN_IMPORT(0, false, WHvGetVirtualProcessorState),
+    NEM_WIN_IMPORT(0, false, WHvSetVirtualProcessorState),
     NEM_WIN_IMPORT(0, false, WHvRequestInterrupt),
 #undef NEM_WIN_IMPORT
@@ -267,5 +268,6 @@
 # define WHvSuspendPartitionTime                    g_pfnWHvSuspendPartitionTime
 # define WHvResumePartitionTime                     g_pfnWHvResumePartitionTime
-//# define WHvGetVirtualProcessorState                g_pfnWHvGetVirtualProcessorState
+# define WHvGetVirtualProcessorState                g_pfnWHvGetVirtualProcessorState
+# define WHvSetVirtualProcessorState                g_pfnWHvSetVirtualProcessorState
 # define WHvRequestInterrupt                        g_pfnWHvRequestInterrupt
 #endif
