Index: /trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp	(revision 64836)
+++ /trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp	(revision 64837)
@@ -8946,7 +8946,4 @@
     pVmxTransient->fVMEntryFailed = VMX_ENTRY_INTERRUPTION_INFO_IS_VALID(pVmxTransient->uEntryIntInfo);
 
-    /* Update the VM-exit history array. */
-    HMCPU_EXIT_HISTORY_ADD(pVCpu, pVmxTransient->uExitReason);
-
     /* If the VMLAUNCH/VMRESUME failed, we can bail out early. This does -not- cover VMX_EXIT_ERR_*. */
     if (RT_UNLIKELY(rcVMRun != VINF_SUCCESS))
@@ -8956,4 +8953,7 @@
         return;
     }
+
+    /* Update the VM-exit history array only if the world-switch was successful. */
+    HMCPU_EXIT_HISTORY_ADD(pVCpu, pVmxTransient->uExitReason);
 
     if (RT_LIKELY(!pVmxTransient->fVMEntryFailed))
