Index: trunk/src/VBox/VMM/EM.cpp
===================================================================
--- trunk/src/VBox/VMM/EM.cpp	(revision 3144)
+++ trunk/src/VBox/VMM/EM.cpp	(revision 3145)
@@ -1321,12 +1321,5 @@
          * (The unhandled cases end up with rc == VINF_EM_RESCHEDULE_REM.)
          */
-        if (rc == VINF_EM_RESCHEDULE_REM)
-        {
-            /* emulate this instruction only */
-            goto emulate_instr;
-        }
-
-        if (    rc == VINF_SUCCESS
-            ||  (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST))
+        if (IOM_SUCCESS(rc))
         {
             pCtx->eip += Cpu.opsize;
@@ -1342,4 +1335,5 @@
         }
         AssertMsg(rc != VINF_TRPM_XCPT_DISPATCHED, ("Handle VINF_TRPM_XCPT_DISPATCHED\n"));
+
         if (VBOX_FAILURE(rc))
         {
@@ -1349,5 +1343,4 @@
         AssertMsg(rc == VINF_EM_RESCHEDULE_REM, ("rc=%Vrc\n", rc));
     }
-emulate_instr:
     STAM_PROFILE_STOP(&pVM->em.s.StatIOEmu, a);
     return emR3RawExecuteInstruction(pVM, "IO: ");
Index: trunk/src/VBox/VMM/VMMAll/EMAll.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/EMAll.cpp	(revision 3144)
+++ trunk/src/VBox/VMM/VMMAll/EMAll.cpp	(revision 3145)
@@ -273,6 +273,5 @@
 #ifdef IN_GC
     int rc = IOMGCIOPortHandler(pVM, pCtxCore, pCpu);
-    if (    rc == VINF_SUCCESS
-        ||  (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST))
+    if (IOM_SUCCESS(rc))
         pCtxCore->eip += cbOp;
     return rc;
Index: trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/IOMAll.cpp	(revision 3144)
+++ trunk/src/VBox/VMM/VMMAll/IOMAll.cpp	(revision 3145)
@@ -720,7 +720,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
  *
@@ -862,7 +863,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
  *
@@ -987,7 +989,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
  *
@@ -1107,7 +1110,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
  *
@@ -1327,7 +1331,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
@@ -1364,6 +1369,5 @@
         uint32_t    u32Data = ~0U;
         rc = IOMIOPortRead(pVM, uPort, &u32Data, cbSize);
-        if (    rc == VINF_SUCCESS
-            ||  (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST))
+        if (IOM_SUCCESS(rc))
         {
             /*
@@ -1386,7 +1390,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
Index: trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp	(revision 3144)
+++ trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp	(revision 3145)
@@ -1592,7 +1592,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
@@ -1677,5 +1678,5 @@
         uint32_t u32Value;
         rc = IOMIOPortRead(pVM, uPort, &u32Value, cbTransfer);
-        if (rc == VINF_IOM_HC_IOPORT_READ || VBOX_FAILURE(rc))
+        if (!IOM_SUCCESS(rc))
             break;
         int rc2 = iomRamWrite(pVM, GCPtrDst, &u32Value, cbTransfer);
@@ -1703,7 +1704,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
@@ -1746,7 +1748,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
@@ -1834,5 +1837,5 @@
             break;
         rc = IOMIOPortWrite(pVM, uPort, u32Value, cbTransfer);
-        if (rc == VINF_IOM_HC_IOPORT_WRITE || VBOX_FAILURE(rc))
+        if (!IOM_SUCCESS(rc))
             break;
         GCPtrSrc = (RTGCPTR)((RTUINTPTR)GCPtrSrc + cbTransfer);
@@ -1859,7 +1862,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only)
  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
Index: trunk/src/VBox/VMM/VMMGC/IOMGC.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMGC/IOMGC.cpp	(revision 3144)
+++ trunk/src/VBox/VMM/VMMGC/IOMGC.cpp	(revision 3145)
@@ -54,7 +54,8 @@
  *
  * @returns Strict VBox status code. Informational status codes other than the one documented 
- *          here are to be treated as internal failure.
+ *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success.
  * @retval  VINF_SUCCESS                Success.
- * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM.
+ * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
+ *                                      status code must be passed on to EM.
  * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only)
  * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr)
