Index: /trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp	(revision 42389)
+++ /trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp	(revision 42390)
@@ -1384,4 +1384,6 @@
         rc = VMXWriteVMCS(VMX_VMCS_CTRL_EXIT_MSR_LOAD_COUNT, idxMsr);
         AssertRC(rc);
+
+        pVCpu->hwaccm.s.vmx.cCachedMSRs = idxMsr;
 #endif /* VBOX_WITH_AUTO_MSR_LOAD_RESTORE */
 
@@ -2118,5 +2120,5 @@
     /*
      * Store all guest MSRs in the VM-entry load area, so they will be loaded
-     * during VM-entry and restored into the VM-exit store area during VM-exit.
+     * during the world switch.
      */
     PVMXMSR pMsr = (PVMXMSR)pVCpu->hwaccm.s.vmx.pGuestMSR;
@@ -2175,5 +2177,9 @@
     }
 
-    pVCpu->hwaccm.s.vmx.cCachedMSRs = idxMsr;
+    /*
+     * The number of host MSRs saved must be identical to the number of guest MSRs loaded.
+     * It's not a VT-x requirement but how it's practically used here.
+     */
+    Assert(pVCpu->hwaccm.s.vmx.cCachedMSRs == idxMsr);
 
     rc = VMXWriteVMCS(VMX_VMCS_CTRL_ENTRY_MSR_LOAD_COUNT, idxMsr);
