Index: trunk/src/VBox/VMM/VMMR0/HMR0.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR0/HMR0.cpp	(revision 48152)
+++ trunk/src/VBox/VMM/VMMR0/HMR0.cpp	(revision 48153)
@@ -89,5 +89,4 @@
     DECLR0CALLBACKMEMBER(void, pfnThreadCtxCallback,(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu, bool fGlobalInit));
     DECLR0CALLBACKMEMBER(int,  pfnSaveHostState,(PVM pVM, PVMCPU pVCpu));
-    DECLR0CALLBACKMEMBER(int,  pfnLoadGuestState,(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx));
     DECLR0CALLBACKMEMBER(int,  pfnRunGuestCode,(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx));
     DECLR0CALLBACKMEMBER(int,  pfnEnableCpu,(PHMGLOBALCPUINFO pCpu, PVM pVM, void *pvCpuPage, RTHCPHYS HCPhysCpuPage,
@@ -529,5 +528,4 @@
                 g_HvmR0.pfnThreadCtxCallback = VMXR0ThreadCtxCallback;
                 g_HvmR0.pfnSaveHostState     = VMXR0SaveHostState;
-                g_HvmR0.pfnLoadGuestState    = VMXR0LoadGuestState;
                 g_HvmR0.pfnRunGuestCode      = VMXR0RunGuestCode;
                 g_HvmR0.pfnEnableCpu         = VMXR0EnableCpu;
@@ -594,5 +592,4 @@
         g_HvmR0.pfnThreadCtxCallback = SVMR0ThreadCtxCallback;
         g_HvmR0.pfnSaveHostState     = SVMR0SaveHostState;
-        g_HvmR0.pfnLoadGuestState    = SVMR0LoadGuestState;
         g_HvmR0.pfnRunGuestCode      = SVMR0RunGuestCode;
         g_HvmR0.pfnEnableCpu         = SVMR0EnableCpu;
@@ -658,5 +655,4 @@
     g_HvmR0.pfnThreadCtxCallback = hmR0DummyThreadCtxCallback;
     g_HvmR0.pfnSaveHostState     = hmR0DummySaveHostState;
-    g_HvmR0.pfnLoadGuestState    = hmR0DummyLoadGuestState;
     g_HvmR0.pfnRunGuestCode      = hmR0DummyRunGuestCode;
     g_HvmR0.pfnEnableCpu         = hmR0DummyEnableCpu;
@@ -1459,11 +1455,7 @@
 
     /* Load the host as we may be resuming code after a longjmp and quite
-       possibly be scheduled on a different CPU. */
+       possibly now be scheduled on a different CPU. */
     rc = g_HvmR0.pfnSaveHostState(pVM, pVCpu);
     AssertMsgRCReturn(rc, ("pfnSaveHostState failed. rc=%Rrc pVCpu=%p HostCpuId=%u\n", rc, pVCpu, idCpu), rc);
-
-    /** @todo This is not needed to be done here anymore, can fix/optimize later. */
-    rc = g_HvmR0.pfnLoadGuestState(pVM, pVCpu, pCtx);
-    AssertMsgRCReturn(rc, ("pfnLoadGuestState failed. rc=%Rrc pVCpu=%p HostCpuId=%u\n", rc, pVCpu, idCpu), rc);
 
 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
Index: trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp	(revision 48152)
+++ trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp	(revision 48153)
@@ -1718,25 +1718,4 @@
 
 /**
- * Loads the guest state on the way from ring-3.
- *
- * @returns VBox status code.
- * @param   pVM         Pointer to the VM.
- * @param   pVCpu       Pointer to the VMCPU.
- * @param   pCtx        Pointer to the guest-CPU context.
- *
- * @remarks No-long-jump zone!!!
- */
-VMMR0DECL(int) SVMR0LoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx)
-{
-    /*
-     * Avoid reloading the guest state on longjmp reentrants and do it lazily just before executing the guest.
-     * This only helps when we get rescheduled more than once to a different host CPU on a longjmp trip before
-     * finally executing guest code.
-     */
-    return VINF_SUCCESS;
-}
-
-
-/**
  * Saves the entire guest state from the VMCB into the
  * guest-CPU context. Currently there is no residual state left in the CPU that
Index: trunk/src/VBox/VMM/VMMR0/HMSVMR0.h
===================================================================
--- trunk/src/VBox/VMM/VMMR0/HMSVMR0.h	(revision 48152)
+++ trunk/src/VBox/VMM/VMMR0/HMSVMR0.h	(revision 48153)
@@ -41,5 +41,4 @@
 VMMR0DECL(void) SVMR0GlobalTerm(void);
 VMMR0DECL(int)  SVMR0Enter(PVM pVM, PVMCPU pVCpu, PHMGLOBALCPUINFO pCpu);
-VMMR0DECL(int)  SVMR0Leave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
 VMMR0DECL(void) SVMR0ThreadCtxCallback(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu, bool fGlobalInit);
 VMMR0DECL(int)  SVMR0EnableCpu(PHMGLOBALCPUINFO pCpu, PVM pVM, void *pvPageCpu, RTHCPHYS HCPhysCpuPage, bool fEnabledBySystem);
@@ -50,5 +49,4 @@
 VMMR0DECL(int)  SVMR0RunGuestCode(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
 VMMR0DECL(int)  SVMR0SaveHostState(PVM pVM, PVMCPU pVCpu);
-VMMR0DECL(int)  SVMR0LoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
 
 #if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
Index: trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp	(revision 48152)
+++ trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp	(revision 48153)
@@ -7200,30 +7200,4 @@
     AssertMsg(!(pVCpu->hm.s.fContextUseFlags & HM_CHANGED_HOST_GUEST_SHARED_STATE), ("fContextUseFlags=%#x\n",
                                                                                      pVCpu->hm.s.fContextUseFlags));
-}
-
-
-/**
- * Loads the guest state into the VMCS guest-state area.
- *
- * @returns VBox status code.
- * @param   pVM         Pointer to the VM.
- * @param   pVCpu       Pointer to the VMCPU.
- * @param   pMixedCtx   Pointer to the guest-CPU context. The data may be
- *                      out-of-sync. Make sure to update the required fields
- *                      before using them.
- *
- * @remarks No-long-jump zone!!!
- */
-VMMR0DECL(int) VMXR0LoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
-{
-    /*
-     * Avoid reloading the guest state on longjmp reentrants and do it lazily just before executing the guest.
-     * When thread-context hooks are not used: This only helps when we get rescheduled more than once to a
-     * different host CPU on a longjmp trip before finally executing guest code.
-     *
-     * When thread-context hooks are used: We avoid loading the guest state here for the above reason plus
-     * we can avoid doing it while preemption is disabled (which it is here).
-     */
-    return VINF_SUCCESS;
 }
 
Index: trunk/src/VBox/VMM/VMMR0/HMVMXR0.h
===================================================================
--- trunk/src/VBox/VMM/VMMR0/HMVMXR0.h	(revision 48152)
+++ trunk/src/VBox/VMM/VMMR0/HMVMXR0.h	(revision 48153)
@@ -30,5 +30,4 @@
 
 VMMR0DECL(int)  VMXR0Enter(PVM pVM, PVMCPU pVCpu, PHMGLOBALCPUINFO pCpu);
-VMMR0DECL(int)  VMXR0Leave(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
 VMMR0DECL(void) VMXR0ThreadCtxCallback(RTTHREADCTXEVENT enmEvent, PVMCPU pVCpu, bool fGlobalInit);
 VMMR0DECL(int)  VMXR0EnableCpu(PHMGLOBALCPUINFO pCpu, PVM pVM, void *pvPageCpu, RTHCPHYS pPageCpuPhys, bool fEnabledBySystem);
@@ -40,5 +39,4 @@
 VMMR0DECL(int)  VMXR0SetupVM(PVM pVM);
 VMMR0DECL(int)  VMXR0SaveHostState(PVM pVM, PVMCPU pVCpu);
-VMMR0DECL(int)  VMXR0LoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
 VMMR0DECL(int)  VMXR0RunGuestCode(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);
 DECLASM(int)    VMXR0StartVM32(RTHCUINT fResume, PCPUMCTX pCtx, PVMCSCACHE pCache, PVM pVM, PVMCPU pVCpu);
