Index: /trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp	(revision 55039)
+++ /trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp	(revision 55040)
@@ -5002,20 +5002,25 @@
     int rc = hmR0SvmEmulateMovTpr(pVCpu->CTX_SUFF(pVM), pVCpu, pCtx);
     if (rc == VINF_SUCCESS)
+    {
         HMSVM_CHECK_SINGLE_STEP(pVCpu, rc);
+        return VINF_SUCCESS;
+    }
     else if (rc == VERR_NOT_FOUND)
     {
         /* Handle GIM provider hypercalls. */
-        rc = VERR_NOT_SUPPORTED;
         if (GIMAreHypercallsEnabled(pVCpu))
+        {
             rc = GIMHypercall(pVCpu, pCtx);
-
-        /* If the hypercall changes anything other than guest general-purpose registers,
-           we would need to reload the guest changed bits on VM-reentry. */
-    }
-
-    if (RT_SUCCESS(rc))
-        hmR0SvmUpdateRip(pVCpu, pCtx, 3);
-    else
-        hmR0SvmSetPendingXcptUD(pVCpu);
+            /* If the hypercall changes anything other than guest general-purpose registers,
+               we would need to reload the guest changed bits on VM-reentry. */
+            if (RT_SUCCESS(rc))
+            {
+                hmR0SvmUpdateRip(pVCpu, pCtx, 3);
+                return VINF_SUCCESS;
+            }
+        }
+    }
+
+    hmR0SvmSetPendingXcptUD(pVCpu);
     return VINF_SUCCESS;
 }
@@ -5222,6 +5227,4 @@
     HMSVM_CHECK_EXIT_DUE_TO_EVENT_DELIVERY();
 
-    STAM_COUNTER_INC(&pVCpu->hm.s.StatExitGuestUD);
-
     PVM pVM = pVCpu->CTX_SUFF(pVM);
     if (   pVM->hm.s.fTrapXcptUD
@@ -5231,4 +5234,5 @@
         hmR0SvmSetPendingXcptUD(pVCpu);
 
+    STAM_COUNTER_INC(&pVCpu->hm.s.StatExitGuestUD);
     return VINF_SUCCESS;
 }
