Index: /trunk/include/VBox/vmm/dbgf.h
===================================================================
--- /trunk/include/VBox/vmm/dbgf.h	(revision 38837)
+++ /trunk/include/VBox/vmm/dbgf.h	(revision 38838)
@@ -510,4 +510,5 @@
 VMMR3DECL(int) DBGFR3InfoDeregisterExternal(PVM pVM, const char *pszName);
 VMMR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp);
+VMMR3DECL(int) DBGFR3InfoEx(PVM pVM, VMCPUID idCpu, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp);
 VMMR3DECL(int) DBGFR3InfoLogRel(PVM pVM, const char *pszName, const char *pszArgs);
 VMMR3DECL(int) DBGFR3InfoStdErr(PVM pVM, const char *pszName, const char *pszArgs);
Index: /trunk/include/VBox/vmm/vmapi.h
===================================================================
--- /trunk/include/VBox/vmm/vmapi.h	(revision 38837)
+++ /trunk/include/VBox/vmm/vmapi.h	(revision 38838)
@@ -227,5 +227,8 @@
     VMREQFLAGS_NO_WAIT      = 2,
     /** Poke the destination EMT(s) if executing guest code. Use with care. */
-    VMREQFLAGS_POKE         = 4
+    VMREQFLAGS_POKE         = 4,
+    /** Priority request that can safely be processed while doing async
+     *  suspend and power off. */
+    VMREQFLAGS_PRIORITY     = 8
 } VMREQFLAGS;
 
@@ -385,11 +388,9 @@
 VMMR3DECL(int)      VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
 VMMR3DECL(int)      VMR3ReqCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
-VMMR3DECL(int)      VMR3ReqCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
 VMMR3DECL(int)      VMR3ReqCallNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
-VMMR3DECL(int)      VMR3ReqCallNoWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
 VMMR3DECL(int)      VMR3ReqCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
-VMMR3DECL(int)      VMR3ReqCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
 VMMR3DECL(int)      VMR3ReqCallVoidNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
-VMMR3DECL(int)      VMR3ReqCallVoidNoWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
+VMMR3DECL(int)      VMR3ReqPriorityCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
+VMMR3DECL(int)      VMR3ReqPriorityCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
 VMMR3DECL(int)      VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
 VMMR3DECL(int)      VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
@@ -397,5 +398,5 @@
 VMMR3DECL(int)      VMR3ReqQueue(PVMREQ pReq, RTMSINTERVAL cMillies);
 VMMR3DECL(int)      VMR3ReqWait(PVMREQ pReq, RTMSINTERVAL cMillies);
-VMMR3DECL(int)      VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu);
+VMMR3DECL(int)      VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu, bool fPriorityOnly);
 VMMR3DECL(void)     VMR3NotifyGlobalFFU(PUVM pUVM, uint32_t fFlags);
 VMMR3DECL(void)     VMR3NotifyCpuFFU(PUVMCPU pUVMCpu, uint32_t fFlags);
Index: /trunk/src/VBox/Debugger/DBGCCommands.cpp
===================================================================
--- /trunk/src/VBox/Debugger/DBGCCommands.cpp	(revision 38837)
+++ /trunk/src/VBox/Debugger/DBGCCommands.cpp	(revision 38838)
@@ -906,10 +906,10 @@
      * Dump it.
      */
-    /** @todo DBGFR3Info should do this, not we. */
-    int rc = VMR3ReqCallWait(pVM, pDbgc->idCpu, (PFNRT)DBGFR3Info, 4,
-                             pVM, paArgs[0].u.pszString, cArgs == 2 ? paArgs[1].u.pszString : NULL,
-                             DBGCCmdHlpGetDbgfOutputHlp(pCmdHlp));
+    int rc = DBGFR3InfoEx(pVM, pDbgc->idCpu, 
+                          paArgs[0].u.pszString, 
+                          cArgs == 2 ? paArgs[1].u.pszString : NULL, 
+                          DBGCCmdHlpGetDbgfOutputHlp(pCmdHlp));
     if (RT_FAILURE(rc))
-        return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3Info()\n");
+        return pCmdHlp->pfnVBoxError(pCmdHlp, rc, "DBGFR3InfoEx()\n");
 
     NOREF(pCmd);
Index: /trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp
===================================================================
--- /trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp	(revision 38837)
+++ /trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp	(revision 38838)
@@ -104,4 +104,8 @@
 }
 VMMR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
+{
+    return VERR_INTERNAL_ERROR;
+}
+VMMR3DECL(int) DBGFR3InfoEx(PVM pVM, VMCPUID idCpu, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
 {
     return VERR_INTERNAL_ERROR;
@@ -405,6 +409,2 @@
 }
 
-VMMR3DECL(int) VMR3ReqCallWait(PVM pVm, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
-{
-    return VERR_INTERNAL_ERROR;
-}
Index: /trunk/src/VBox/Devices/Storage/ATAController.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/ATAController.cpp	(revision 38837)
+++ /trunk/src/VBox/Devices/Storage/ATAController.cpp	(revision 38838)
@@ -2408,7 +2408,7 @@
 
                         PDMCritSectLeave(&pCtl->lock);
-                        rc = VMR3ReqCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,
-                                             (PFNRT)s->pDrvMount->pfnUnmount, 3, s->pDrvMount,
-                                             false /*=fForce*/, true /*=fEeject*/);
+                        rc = VMR3ReqPriorityCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,
+                                                     (PFNRT)s->pDrvMount->pfnUnmount, 3, s->pDrvMount,
+                                                     false /*=fForce*/, true /*=fEeject*/);
                         Assert(RT_SUCCESS(rc) || (rc == VERR_PDM_MEDIA_LOCKED) || (rc = VERR_PDM_MEDIA_NOT_MOUNTED));
                         if (RT_SUCCESS(rc) && pCtl->pMediaNotify)
Index: /trunk/src/VBox/Devices/Storage/DevAHCI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 38837)
+++ /trunk/src/VBox/Devices/Storage/DevAHCI.cpp	(revision 38838)
@@ -4415,7 +4415,7 @@
                         PPDMDEVINS pDevIns = pAhci->CTX_SUFF(pDevIns);
 
-                        rc2 = VMR3ReqCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,
-                                              (PFNRT)pAhciPort->pDrvMount->pfnUnmount, 3,
-                                              pAhciPort->pDrvMount, false/*=fForce*/, true/*=fEject*/);
+                        rc2 = VMR3ReqPriorityCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,
+                                                      (PFNRT)pAhciPort->pDrvMount->pfnUnmount, 3,
+                                                      pAhciPort->pDrvMount, false/*=fForce*/, true/*=fEject*/);
                         Assert(RT_SUCCESS(rc2) || (rc2 == VERR_PDM_MEDIA_LOCKED) || (rc2 = VERR_PDM_MEDIA_NOT_MOUNTED));
                         if (RT_SUCCESS(rc) && pAhci->pMediaNotify)
Index: /trunk/src/VBox/Devices/Storage/DevATA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 38837)
+++ /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 38838)
@@ -3125,7 +3125,7 @@
 
                         PDMCritSectLeave(&pCtl->lock);
-                        rc = VMR3ReqCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,
-                                             (PFNRT)s->pDrvMount->pfnUnmount, 3,
-                                             s->pDrvMount, false /*=fForce*/, true /*=fEject*/);
+                        rc = VMR3ReqPriorityCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,
+                                                     (PFNRT)s->pDrvMount->pfnUnmount, 3,
+                                                     s->pDrvMount, false /*=fForce*/, true /*=fEject*/);
                         Assert(RT_SUCCESS(rc) || (rc == VERR_PDM_MEDIA_LOCKED) || (rc = VERR_PDM_MEDIA_NOT_MOUNTED));
                         if (RT_SUCCESS(rc) && pThis->pMediaNotify)
Index: /trunk/src/VBox/Main/src-client/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 38837)
+++ /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 38838)
@@ -2288,6 +2288,9 @@
     while (cRetries-- > 0)
     {
-        vrc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)Display::displayTakeScreenshotEMT, 6,
-                              pDisplay, aScreenId, &pu8Data, &cbData, &cx, &cy);
+        /* Note! Not sure if the priority call is such a good idea here, but
+                 it would be nice to have an accurate screenshot for the bug
+                 report if the VM deadlocks. */
+        vrc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)Display::displayTakeScreenshotEMT, 6,
+                                      pDisplay, aScreenId, &pu8Data, &cbData, &cx, &cy);
         if (vrc != VERR_TRY_AGAIN)
         {
Index: /trunk/src/VBox/VMM/VMMAll/VMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/VMAll.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMAll/VMAll.cpp	(revision 38838)
@@ -81,6 +81,6 @@
     va_list va2;
     va_copy(va2, args); /* Have to make a copy here or GCC will break. */
-    VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)vmR3SetErrorUV, 7,   /* ASSUMES 3 source pos args! */
-                    pVM->pUVM, rc, RT_SRC_POS_ARGS, pszFormat, &va2);
+    VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)vmR3SetErrorUV, 7,   /* ASSUMES 3 source pos args! */
+                            pVM->pUVM, rc, RT_SRC_POS_ARGS, pszFormat, &va2);
     va_end(va2);
 
@@ -262,6 +262,6 @@
         va_list va2;
         va_copy(va2, va); /* Have to make a copy here or GCC will break. */
-        rc = VMR3ReqCallWaitU(pVM->pUVM, VMCPUID_ANY,
-                              (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2);
+        rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY,
+                                     (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2);
         va_end(va2);
     }
@@ -269,6 +269,6 @@
     {
         char *pszMessage = MMR3HeapAPrintfV(pVM, MM_TAG_VM, pszFormat, va);
-        rc = VMR3ReqCallNoWaitU(pVM->pUVM, VMCPUID_ANY,
-                                (PFNRT)vmR3SetRuntimeError, 4, pVM, fFlags, pszErrorId, pszMessage);
+        rc = VMR3ReqCallNoWait(pVM, VMCPUID_ANY,
+                               (PFNRT)vmR3SetRuntimeError, 4, pVM, fFlags, pszErrorId, pszMessage);
         if (RT_FAILURE(rc))
             MMR3HeapFree(pszMessage);
Index: /trunk/src/VBox/VMM/VMMR3/DBGF.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGF.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGF.cpp	(revision 38838)
@@ -650,7 +650,7 @@
             {
                 LogFlow(("dbgfR3VMMWait: Processes requests...\n"));
-                rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY);
+                rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY, false /*fPriorityOnly*/);
                 if (rc == VINF_SUCCESS)
-                    rc = VMR3ReqProcessU(pVM->pUVM, pVCpu->idCpu);
+                    rc = VMR3ReqProcessU(pVM->pUVM, pVCpu->idCpu, false /*fPriorityOnly*/);
                 LogFlow(("dbgfR3VMMWait: VMR3ReqProcess -> %Rrc rcRet=%Rrc\n", rc, rcRet));
                 cPollHack = 1;
@@ -854,19 +854,5 @@
 VMMR3DECL(int) DBGFR3Attach(PVM pVM)
 {
-    /*
-     * Some validations first.
-     */
-    if (!VALID_PTR(pVM))
-    {
-        Log(("DBGFR3Attach: bad VM handle: %p\n", pVM));
-        return VERR_INVALID_HANDLE;
-    }
-    VMSTATE enmVMState = pVM->enmVMState;
-    if (    enmVMState >= VMSTATE_DESTROYING
-        ||  enmVMState <  VMSTATE_CREATING)
-    {
-        Log(("DBGFR3Attach: Invalid VM state: %s\n", VMGetStateName(enmVMState)));
-        return VERR_INVALID_HANDLE;
-    }
+    VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
 
     /*
Index: /trunk/src/VBox/VMM/VMMR3/DBGFAddr.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFAddr.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFAddr.cpp	(revision 38838)
@@ -274,6 +274,6 @@
             rc = dbgfR3AddrToPhysOnVCpu(pVCpu, pAddress, pGCPhys);
         else
-            rc = VMR3ReqCallWait(pVCpu->pVMR3, pVCpu->idCpu,
-                                 (PFNRT)dbgfR3AddrToPhysOnVCpu, 3, pVCpu, pAddress, pGCPhys);
+            rc = VMR3ReqPriorityCallWait(pVCpu->pVMR3, pVCpu->idCpu,
+                                         (PFNRT)dbgfR3AddrToPhysOnVCpu, 3, pVCpu, pAddress, pGCPhys);
     }
     return rc;
@@ -432,5 +432,5 @@
      * Convert it.
      */
-    return VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3AddrToVolatileR3PtrOnVCpu, 5, pVM, idCpu, pAddress, fReadOnly, ppvR3Ptr);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3AddrToVolatileR3PtrOnVCpu, 5, pVM, idCpu, pAddress, fReadOnly, ppvR3Ptr);
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/DBGFBp.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFBp.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFBp.cpp	(revision 38838)
@@ -281,8 +281,8 @@
 {
     /*
-     * This must be done in EMT.
+     * This must be done on EMT.
      */
     /** @todo SMP? */
-    int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpSetInt3, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);
+    int rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpSetInt3, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);
     LogFlow(("DBGFR3BpSet: returns %Rrc\n", rc));
     return rc;
@@ -439,7 +439,7 @@
     /** @todo SMP - broadcast, VT-x/AMD-V. */
     /*
-     * This must be done in EMT.
-     */
-    int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpSetReg, 7, pVM, pAddress, &iHitTrigger, &iHitDisable, fType, cb, piBp);
+     * This must be done on EMT.
+     */
+    int rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpSetReg, 7, pVM, pAddress, &iHitTrigger, &iHitDisable, fType, cb, piBp);
     LogFlow(("DBGFR3BpSetReg: returns %Rrc\n", rc));
     return rc;
@@ -606,7 +606,7 @@
 {
     /*
-     * This must be done in EMT.
-     */
-    int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpSetREM, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);
+     * This must be done on EMT.
+     */
+    int rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpSetREM, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);
     LogFlow(("DBGFR3BpSetREM: returns %Rrc\n", rc));
     return rc;
@@ -698,7 +698,7 @@
 {
     /*
-     * This must be done in EMT.
-     */
-    int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpClear, 2, pVM, iBp);
+     * This must be done on EMT.
+     */
+    int rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpClear, 2, pVM, iBp);
     LogFlow(("DBGFR3BpClear: returns %Rrc\n", rc));
     return rc;
@@ -771,7 +771,7 @@
 {
     /*
-     * This must be done in EMT.
-     */
-    int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpEnable, 2, pVM, iBp);
+     * This must be done on EMT.
+     */
+    int rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpEnable, 2, pVM, iBp);
     LogFlow(("DBGFR3BpEnable: returns %Rrc\n", rc));
     return rc;
@@ -844,7 +844,7 @@
 {
     /*
-     * This must be done in EMT.
-     */
-    int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpDisable, 2, pVM, iBp);
+     * This must be done on EMT.
+     */
+    int rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpDisable, 2, pVM, iBp);
     LogFlow(("DBGFR3BpDisable: returns %Rrc\n", rc));
     return rc;
@@ -916,7 +916,7 @@
 {
     /*
-     * This must be done in EMT.
-     */
-    int rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpEnum, 3, pVM, pfnCallback, pvUser);
+     * This must be done on EMT.
+     */
+    int rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3BpEnum, 3, pVM, pfnCallback, pvUser);
     LogFlow(("DBGFR3BpClear: returns %Rrc\n", rc));
     return rc;
Index: /trunk/src/VBox/VMM/VMMR3/DBGFCpu.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFCpu.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFCpu.cpp	(revision 38838)
@@ -61,5 +61,5 @@
 
     CPUMMODE enmMode;
-    int rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3CpuGetMode, 3, pVM, idCpu, &enmMode);
+    int rc = VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3CpuGetMode, 3, pVM, idCpu, &enmMode);
     if (RT_FAILURE(rc))
         return CPUMMODE_INVALID;
Index: /trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp	(revision 38838)
@@ -593,6 +593,6 @@
         rc = dbgfR3DisasInstrExOnVCpu(pVM, pVCpu, Sel, &GCPtr, fFlags, pszOutput, cbOutput, pcbInstr);
     else
-        rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3DisasInstrExOnVCpu, 8,
-                             pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cbOutput, pcbInstr);
+        rc = VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3DisasInstrExOnVCpu, 8,
+                                     pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cbOutput, pcbInstr);
     return rc;
 }
Index: /trunk/src/VBox/VMM/VMMR3/DBGFInfo.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFInfo.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFInfo.cpp	(revision 38838)
@@ -685,22 +685,20 @@
 
 /**
- * Display a piece of info writing to the supplied handler.
- *
- * @returns VBox status code.
- * @param   pVM         VM handle.
- * @param   pszName     The identifier of the info to display.
- * @param   pszArgs     Arguments to the info handler.
- * @param   pHlp        The output helper functions. If NULL the logger will be used.
- */
-VMMR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
+ * Worker for DBGFR3Info and DBGFR3InfoEx. 
+ *  
+ * @returns VBox status code.
+ * @param   pVM                 The VM handle. 
+ * @param   idCpu               Which CPU to run EMT bound handlers on. 
+ *                              VMCPUID_ANY or a valid CPU ID.
+ * @param   pszName             What to dump.
+ * @param   pszArgs             Arguments, optional.
+ * @param   pHlp                Output helper, optional.
+ */
+static DECLCALLBACK(int) dbgfR3Info(PVM pVM, VMCPUID idCpu, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
 {
     /*
      * Validate input.
      */
-    if (!pszName)
-    {
-        AssertMsgFailed(("!pszName\n"));
-        return VERR_INVALID_PARAMETER;
-    }
+    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
     if (pHlp)
     {
@@ -741,5 +739,5 @@
             case DBGFINFOTYPE_DEV:
                 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
-                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Dev.pfnHandler, 3, Info.u.Dev.pDevIns, pHlp, pszArgs);
+                    rc = VMR3ReqCallVoidWait(pVM, idCpu, (PFNRT)Info.u.Dev.pfnHandler, 3, Info.u.Dev.pDevIns, pHlp, pszArgs);
                 else
                     Info.u.Dev.pfnHandler(Info.u.Dev.pDevIns, pHlp, pszArgs);
@@ -748,5 +746,5 @@
             case DBGFINFOTYPE_DRV:
                 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
-                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Drv.pfnHandler, 3, Info.u.Drv.pDrvIns, pHlp, pszArgs);
+                    rc = VMR3ReqCallVoidWait(pVM, idCpu, (PFNRT)Info.u.Drv.pfnHandler, 3, Info.u.Drv.pDrvIns, pHlp, pszArgs);
                 else
                     Info.u.Drv.pfnHandler(Info.u.Drv.pDrvIns, pHlp, pszArgs);
@@ -755,5 +753,5 @@
             case DBGFINFOTYPE_INT:
                 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
-                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Int.pfnHandler, 3, pVM, pHlp, pszArgs);
+                    rc = VMR3ReqCallVoidWait(pVM, idCpu, (PFNRT)Info.u.Int.pfnHandler, 3, pVM, pHlp, pszArgs);
                 else
                     Info.u.Int.pfnHandler(pVM, pHlp, pszArgs);
@@ -762,5 +760,5 @@
             case DBGFINFOTYPE_EXT:
                 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
-                    rc = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Info.u.Ext.pfnHandler, 3, Info.u.Ext.pvUser, pHlp, pszArgs);
+                    rc = VMR3ReqCallVoidWait(pVM, idCpu, (PFNRT)Info.u.Ext.pfnHandler, 3, Info.u.Ext.pvUser, pHlp, pszArgs);
                 else
                     Info.u.Ext.pfnHandler(Info.u.Ext.pvUser, pHlp, pszArgs);
@@ -780,4 +778,38 @@
     }
     return rc;
+}
+
+/**
+ * Display a piece of info writing to the supplied handler.
+ *
+ * @returns VBox status code.
+ * @param   pVM         VM handle.
+ * @param   pszName     The identifier of the info to display.
+ * @param   pszArgs     Arguments to the info handler.
+ * @param   pHlp        The output helper functions. If NULL the logger will be used.
+ */
+VMMR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
+{
+    return dbgfR3Info(pVM, VMCPUID_ANY, pszName, pszArgs, pHlp);
+}
+
+
+/**
+ * Display a piece of info writing to the supplied handler.
+ *
+ * @returns VBox status code.
+ * @param   pVM         VM handle. 
+ * @param   idCpu       The CPU to exectue the request on.  Pass NIL_VMCPUID 
+ *                      to not involve any EMT.
+ * @param   pszName     The identifier of the info to display.
+ * @param   pszArgs     Arguments to the info handler.
+ * @param   pHlp        The output helper functions. If NULL the logger will be used.
+ */
+VMMR3DECL(int) DBGFR3InfoEx(PVM pVM, VMCPUID idCpu, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
+{
+    if (idCpu == NIL_VMCPUID)
+        return dbgfR3Info(pVM, VMCPUID_ANY, pszName, pszArgs, pHlp);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, 
+                                   (PFNRT)dbgfR3Info, 5, pVM, idCpu, pszName, pszArgs, pHlp);
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/DBGFLog.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFLog.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFLog.cpp	(revision 38838)
@@ -48,5 +48,5 @@
     AssertPtrReturn(pszGroupSettings, VERR_INVALID_POINTER);
 
-    return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3LogModifyGroups, 2, pVM, pszGroupSettings);
+    return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3LogModifyGroups, 2, pVM, pszGroupSettings);
 }
 
@@ -80,5 +80,5 @@
     AssertPtrReturn(pszFlagSettings, VERR_INVALID_POINTER);
 
-    return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3LogModifyFlags, 2, pVM, pszFlagSettings);
+    return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3LogModifyFlags, 2, pVM, pszFlagSettings);
 }
 
@@ -112,5 +112,5 @@
     AssertReturn(VALID_PTR(pszDestSettings), VERR_INVALID_POINTER);
 
-    return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3LogModifyDestinations, 2, pVM, pszDestSettings);
+    return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3LogModifyDestinations, 2, pVM, pszDestSettings);
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/DBGFMem.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFMem.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFMem.cpp	(revision 38838)
@@ -127,6 +127,6 @@
     VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
     AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);
-    return VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3MemScan, 8,
-                           pVM, idCpu, pAddress, &cbRange, &uAlign, pvNeedle, cbNeedle, pHitAddress);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3MemScan, 8,
+                                   pVM, idCpu, pAddress, &cbRange, &uAlign, pvNeedle, cbNeedle, pHitAddress);
 
 }
@@ -212,5 +212,5 @@
         return VMMR3ReadR0Stack(pVM, idCpu, (RTHCUINTPTR)pAddress->FlatPtr, pvBuf, cbRead);
     }
-    return VMR3ReqCallWaitU(pVM->pUVM, idCpu, (PFNRT)dbgfR3MemRead, 5, pVM, idCpu, pAddress, pvBuf, cbRead);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3MemRead, 5, pVM, idCpu, pAddress, pvBuf, cbRead);
 }
 
@@ -291,5 +291,5 @@
      * Pass it on to the EMT.
      */
-    return VMR3ReqCallWaitU(pVM->pUVM, idCpu, (PFNRT)dbgfR3MemReadString, 5, pVM, idCpu, pAddress, pszBuf, cchBuf);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3MemReadString, 5, pVM, idCpu, pAddress, pszBuf, cchBuf);
 }
 
@@ -367,5 +367,5 @@
     VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
     AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);
-    return VMR3ReqCallWaitU(pVM->pUVM, idCpu, (PFNRT)dbgfR3MemWrite, 5, pVM, idCpu, pAddress, pvBuf, cbWrite);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3MemWrite, 5, pVM, idCpu, pAddress, pvBuf, cbWrite);
 }
 
@@ -470,5 +470,5 @@
      * Dispatch the request to a worker running on the target CPU.
      */
-    return VMR3ReqCallWaitU(pVM->pUVM, idCpu, (PFNRT)dbgfR3SelQueryInfo, 5, pVM, idCpu, Sel, fFlags, pSelInfo);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3SelQueryInfo, 5, pVM, idCpu, Sel, fFlags, pSelInfo);
 }
 
@@ -657,6 +657,6 @@
      * Forward the request to the target CPU.
      */
-    return VMR3ReqCallWaitU(pVM->pUVM, idCpu, (PFNRT)dbgfR3PagingDumpEx, 8,
-                            pVM, idCpu, fFlags, &cr3, &u64FirstAddr, &u64LastAddr, cMaxDepth, pHlp);
-}
-
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3PagingDumpEx, 8,
+                                   pVM, idCpu, fFlags, &cr3, &u64FirstAddr, &u64LastAddr, cMaxDepth, pHlp);
+}
+
Index: /trunk/src/VBox/VMM/VMMR3/DBGFOS.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFOS.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFOS.cpp	(revision 38838)
@@ -156,5 +156,5 @@
      * Pass it on to EMT(0).
      */
-    return VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3OSRegister, 2, pVM, pReg);
+    return VMR3ReqPriorityCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3OSRegister, 2, pVM, pReg);
 }
 
@@ -247,5 +247,5 @@
      * Pass it on to EMT(0).
      */
-    return VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3OSDeregister, 2, pVM, pReg);
+    return VMR3ReqPriorityCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3OSDeregister, 2, pVM, pReg);
 }
 
@@ -319,5 +319,5 @@
      * Pass it on to EMT(0).
      */
-    return VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3OSDetect, 3, pVM, pszName, cchName);
+    return VMR3ReqPriorityCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)dbgfR3OSDetect, 3, pVM, pszName, cchName);
 }
 
@@ -397,6 +397,6 @@
      * Pass it on to EMT(0).
      */
-    return VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/,
-                            (PFNRT)dbgfR3OSQueryNameAndVersion, 5, pVM, pszName, cchName, pszVersion, cchVersion);
+    return VMR3ReqPriorityCallWait(pVM, 0 /*idDstCpu*/,
+                                   (PFNRT)dbgfR3OSQueryNameAndVersion, 5, pVM, pszName, cchName, pszVersion, cchVersion);
 }
 
@@ -442,5 +442,5 @@
      */
     void *pvIf = NULL;
-    VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf);
+    VMR3ReqPriorityCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf);
     return pvIf;
 }
Index: /trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp	(revision 38838)
@@ -864,6 +864,6 @@
     AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);
 
-    return VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorkerOnCpu, 6,
-                           pVM, idCpu, enmReg, enmType, fGuestRegs, pValue);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3RegCpuQueryWorkerOnCpu, 6,
+                                   pVM, idCpu, enmReg, enmType, fGuestRegs, pValue);
 }
 
@@ -1409,5 +1409,5 @@
         else if (idDefCpu != VMCPUID_ANY)
             idDefCpu &= ~DBGFREG_HYPER_VMCPUID;
-        return VMR3ReqCallWait(pVM, idDefCpu, (PFNRT)dbgfR3RegNmQueryWorkerOnCpu, 5, pVM, pLookupRec, enmType, pValue, penmType);
+        return VMR3ReqPriorityCallWait(pVM, idDefCpu, (PFNRT)dbgfR3RegNmQueryWorkerOnCpu, 5, pVM, pLookupRec, enmType, pValue, penmType);
     }
     return VERR_DBGF_REGISTER_NOT_FOUND;
@@ -2280,5 +2280,5 @@
     Args.cchLeftBuf = cbBuf - 1;
     Args.rc         = VINF_SUCCESS;
-    int rc = VMR3ReqCallWait(pVM, Args.idCpu, (PFNRT)dbgfR3RegPrintfWorkerOnCpu, 1, &Args);
+    int rc = VMR3ReqPriorityCallWait(pVM, Args.idCpu, (PFNRT)dbgfR3RegPrintfWorkerOnCpu, 1, &Args);
     va_end(Args.va);
     return rc;
Index: /trunk/src/VBox/VMM/VMMR3/DBGFStack.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFStack.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFStack.cpp	(revision 38838)
@@ -454,7 +454,7 @@
             AssertFailedReturn(VERR_INVALID_PARAMETER);
     }
-    return VMR3ReqCallWait(pVM, idCpu, (PFNRT)dbgfR3StackWalkCtxFull, 10,
-                           pVM, idCpu, pCtxCore, hAs, enmCodeType,
-                           pAddrFrame, pAddrStack, pAddrPC, enmReturnType, ppFirstFrame);
+    return VMR3ReqPriorityCallWait(pVM, idCpu, (PFNRT)dbgfR3StackWalkCtxFull, 10,
+                                   pVM, idCpu, pCtxCore, hAs, enmCodeType,
+                                   pAddrFrame, pAddrStack, pAddrPC, enmReturnType, ppFirstFrame);
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/EM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/EM.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/EM.cpp	(revision 38838)
@@ -1489,5 +1489,5 @@
         if (VM_FF_IS_PENDING_EXCEPT(pVM, VM_FF_REQUEST, VM_FF_PGM_NO_MEMORY))
         {
-            rc2 = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY);
+            rc2 = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY, false /*fPriorityOnly*/);
             if (rc2 == VINF_EM_OFF || rc2 == VINF_EM_TERMINATE) /** @todo this shouldn't be necessary */
             {
@@ -1541,5 +1541,5 @@
         if (VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_REQUEST))
         {
-            rc2 = VMR3ReqProcessU(pVM->pUVM, pVCpu->idCpu);
+            rc2 = VMR3ReqProcessU(pVM->pUVM, pVCpu->idCpu, false /*fPriorityOnly*/);
             if (rc2 == VINF_EM_OFF || rc2 == VINF_EM_TERMINATE || rc2 == VINF_EM_RESET)
             {
Index: /trunk/src/VBox/VMM/VMMR3/FTM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/FTM.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/FTM.cpp	(revision 38838)
@@ -1329,5 +1329,5 @@
             if (VM_FF_ISPENDING(pVM, VM_FF_REQUEST))
             {
-                rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY);
+                rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY, true /*fPriorityOnly*/);
                 AssertRC(rc);
             }
Index: /trunk/src/VBox/VMM/VMMR3/HWACCM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/HWACCM.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/HWACCM.cpp	(revision 38838)
@@ -1748,10 +1748,11 @@
 VMMR3DECL(int)  HWACMMR3EnablePatching(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem)
 {
+    VM_ASSERT_EMT(pVM);
     Log(("HWACMMR3EnablePatching %RGv size %x\n", pPatchMem, cbPatchMem));
     if (pVM->cCpus > 1)
     {
         /* We own the IOM lock here and could cause a deadlock by waiting for a VCPU that is blocking on the IOM lock. */
-        int rc = VMR3ReqCallNoWaitU(pVM->pUVM, VMCPUID_ANY_QUEUE,
-                                    (PFNRT)hwaccmR3EnablePatching, 4, pVM, VMMGetCpuId(pVM), (RTRCPTR)pPatchMem, cbPatchMem);
+        int rc = VMR3ReqCallNoWait(pVM, VMCPUID_ANY_QUEUE,
+                                   (PFNRT)hwaccmR3EnablePatching, 4, pVM, VMMGetCpuId(pVM), (RTRCPTR)pPatchMem, cbPatchMem);
         AssertRC(rc);
         return rc;
Index: /trunk/src/VBox/VMM/VMMR3/PDM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDM.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/PDM.cpp	(revision 38838)
@@ -1236,13 +1236,11 @@
 static void pdmR3NotifyAsyncWaitAndProcessRequests(PPDMNOTIFYASYNCSTATS pThis, PVM pVM)
 {
-    /** @todo This is utterly nuts and completely unsafe... will get back to it in a
-     *        bit I hope... */
     VM_ASSERT_EMT0(pVM);
     int rc = VMR3AsyncPdmNotificationWaitU(&pVM->pUVM->aCpus[0]);
     AssertReleaseMsg(rc == VINF_SUCCESS, ("%Rrc - %s - %s\n", rc, pThis->pszOp, pThis->szList));
 
-    rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY);
+    rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY, true /*fPriorityOnly*/);
     AssertReleaseMsg(rc == VINF_SUCCESS, ("%Rrc - %s - %s\n", rc, pThis->pszOp, pThis->szList));
-    rc = VMR3ReqProcessU(pVM->pUVM, 0/*idDstCpu*/);
+    rc = VMR3ReqProcessU(pVM->pUVM, 0/*idDstCpu*/, true /*fPriorityOnly*/);
     AssertReleaseMsg(rc == VINF_SUCCESS, ("%Rrc - %s - %s\n", rc, pThis->pszOp, pThis->szList));
 }
Index: /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 38838)
@@ -3104,5 +3104,5 @@
     {
         /* We own the IOM lock here and could cause a deadlock by waiting for a VCPU that is blocking on the IOM lock. */
-        rc = VMR3ReqCallNoWaitU(pVM->pUVM, VMCPUID_ANY_QUEUE, (PFNRT)VMR3Suspend, 1, pVM);
+        rc = VMR3ReqCallNoWait(pVM, VMCPUID_ANY_QUEUE, (PFNRT)VMR3Suspend, 1, pVM);
         AssertRC(rc);
         rc = VINF_EM_SUSPEND;
@@ -3166,5 +3166,5 @@
         && pVM->pUVM->pVmm2UserMethods->pfnSaveState)
     {
-        rc = VMR3ReqCallNoWaitU(pVM->pUVM, VMCPUID_ANY_QUEUE, (PFNRT)pdmR3DevHlp_VMSuspendSaveAndPowerOffWorker, 2, pVM, pDevIns);
+        rc = VMR3ReqCallNoWait(pVM, VMCPUID_ANY_QUEUE, (PFNRT)pdmR3DevHlp_VMSuspendSaveAndPowerOffWorker, 2, pVM, pDevIns);
         if (RT_SUCCESS(rc))
         {
@@ -3195,5 +3195,5 @@
     {
         /* We own the IOM lock here and could cause a deadlock by waiting for a VCPU that is blocking on the IOM lock. */
-        rc = VMR3ReqCallNoWaitU(pVM->pUVM, VMCPUID_ANY_QUEUE, (PFNRT)VMR3PowerOff, 1, pVM);
+        rc = VMR3ReqCallNoWait(pVM, VMCPUID_ANY_QUEUE, (PFNRT)VMR3PowerOff, 1, pVM);
         AssertRC(rc);
         /* Set the VCPU state to stopped here as well to make sure no
Index: /trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp	(revision 38838)
@@ -142,6 +142,6 @@
                     pgmUnlock(pVM);
 
-                    return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)pgmR3PhysReadExternalEMT, 4,
-                                           pVM, &GCPhys, pvBuf, cbRead);
+                    return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)pgmR3PhysReadExternalEMT, 4,
+                                                   pVM, &GCPhys, pvBuf, cbRead);
                 }
                 Assert(!PGM_PAGE_IS_MMIO(pPage));
@@ -281,6 +281,6 @@
                         pgmUnlock(pVM);
 
-                        return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)pgmR3PhysWriteExternalEMT, 4,
-                                               pVM, &GCPhys, pvBuf, cbWrite);
+                        return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)pgmR3PhysWriteExternalEMT, 4,
+                                                       pVM, &GCPhys, pvBuf, cbWrite);
                     }
                 }
@@ -463,6 +463,6 @@
                     pgmUnlock(pVM);
 
-                    return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)pgmR3PhysGCPhys2CCPtrDelegated, 4,
-                                           pVM, &GCPhys, ppv, pLock);
+                    return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)pgmR3PhysGCPhys2CCPtrDelegated, 4,
+                                                   pVM, &GCPhys, ppv, pLock);
                 }
             }
@@ -4000,5 +4000,5 @@
         {
             /* Postpone the unmap operation (which requires a rendezvous operation) as we own the PGM lock here. */
-            rc = VMR3ReqCallNoWaitU(pVM->pUVM, VMCPUID_ANY_QUEUE, (PFNRT)pgmR3PhysUnmapChunk, 1, pVM);
+            rc = VMR3ReqCallNoWait(pVM, VMCPUID_ANY_QUEUE, (PFNRT)pgmR3PhysUnmapChunk, 1, pVM);
             AssertRC(rc);
         }
Index: /trunk/src/VBox/VMM/VMMR3/TM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/TM.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/TM.cpp	(revision 38838)
@@ -2696,5 +2696,5 @@
 VMMDECL(int) TMR3SetWarpDrive(PVM pVM, uint32_t u32Percent)
 {
-    return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)tmR3SetWarpDrive, 2, pVM, u32Percent);
+    return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)tmR3SetWarpDrive, 2, pVM, u32Percent);
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/VM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VM.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/VM.cpp	(revision 38838)
@@ -848,5 +848,5 @@
     for (VMCPUID idCpu = 1; idCpu < pVM->cCpus; idCpu++)
     {
-        rc = VMR3ReqCallWaitU(pUVM, idCpu, (PFNRT)vmR3RegisterEMT, 2, pVM, idCpu);
+        rc = VMR3ReqCallWait(pVM, idCpu, (PFNRT)vmR3RegisterEMT, 2, pVM, idCpu);
         if (RT_FAILURE(rc))
             return rc;
@@ -1733,7 +1733,7 @@
      */
     PSSMHANDLE pSSM;
-    int rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/,
-                              (PFNRT)vmR3Save, 10, pVM, cMsMaxDowntime, pszFilename, pStreamOps, pvStreamOpsUser,
-                              enmAfter, pfnProgress, pvProgressUser, &pSSM, fSkipStateChanges);
+    int rc = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/,
+                             (PFNRT)vmR3Save, 10, pVM, cMsMaxDowntime, pszFilename, pStreamOps, pvStreamOpsUser,
+                             enmAfter, pfnProgress, pvProgressUser, &pSSM, fSkipStateChanges);
     if (    RT_SUCCESS(rc)
         &&  pSSM)
@@ -1763,8 +1763,8 @@
                 }
             if (RT_SUCCESS(rc))
-                rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3LiveDoStep2, 2, pVM, pSSM);
+                rc = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)vmR3LiveDoStep2, 2, pVM, pSSM);
             else
             {
-                int rc2 = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)SSMR3LiveDone, 1, pSSM);
+                int rc2 = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)SSMR3LiveDone, 1, pSSM);
                 AssertMsg(rc2 == rc, ("%Rrc != %Rrc\n", rc2, rc));
             }
@@ -1772,5 +1772,5 @@
         else
         {
-            int rc2 = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)SSMR3LiveDone, 1, pSSM);
+            int rc2 = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)SSMR3LiveDone, 1, pSSM);
             AssertMsg(rc2 == rc, ("%Rrc != %Rrc\n", rc2, rc));
 
@@ -2045,7 +2045,7 @@
      * since there is no execution taking place when this call is allowed.
      */
-    int rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
-                              pVM, pszFilename, (uintptr_t)NULL /*pStreamOps*/, (uintptr_t)NULL /*pvStreamOpsUser*/, pfnProgress, pvUser,
-                              false /*fTeleporting*/, false /* fSkipStateChanges */);
+    int rc = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
+                             pVM, pszFilename, (uintptr_t)NULL /*pStreamOps*/, (uintptr_t)NULL /*pvStreamOpsUser*/, pfnProgress, pvUser,
+                             false /*fTeleporting*/, false /* fSkipStateChanges */);
     LogFlow(("VMR3LoadFromFile: returns %Rrc\n", rc));
     return rc;
@@ -2084,7 +2084,7 @@
      * since there is no execution taking place when this call is allowed.
      */
-    int rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
-                              pVM, (uintptr_t)NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser, pfnProgress, pvProgressUser,
-                              true /*fTeleporting*/, false /* fSkipStateChanges */);
+    int rc = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
+                             pVM, (uintptr_t)NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser, pfnProgress, pvProgressUser,
+                             true /*fTeleporting*/, false /* fSkipStateChanges */);
     LogFlow(("VMR3LoadFromStream: returns %Rrc\n", rc));
     return rc;
@@ -2122,7 +2122,7 @@
      * since there is no execution taking place when this call is allowed.
      */
-    int rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
-                              pVM, (uintptr_t)NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser, NULL, NULL,
-                              true /*fTeleporting*/, true /* fSkipStateChanges */);
+    int rc = VMR3ReqCallWait(pVM, 0 /*idDstCpu*/, (PFNRT)vmR3Load, 8,
+                             pVM, (uintptr_t)NULL /*pszFilename*/, pStreamOps, pvStreamOpsUser, NULL, NULL,
+                             true /*fTeleporting*/, true /* fSkipStateChanges */);
     LogFlow(("VMR3LoadFromStream: returns %Rrc\n", rc));
     return rc;
@@ -2349,5 +2349,5 @@
      */
     /* vmR3Destroy on all EMTs, ending with EMT(0). */
-    rc = VMR3ReqCallWaitU(pUVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3Destroy, 1, pVM);
+    rc = VMR3ReqCallWait(pVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3Destroy, 1, pVM);
     AssertLogRelRC(rc);
 
@@ -2535,8 +2535,13 @@
     for (unsigned i = 0; i < 10; i++)
     {
-        PVMREQ pReqHead = ASMAtomicXchgPtrT(&pUVM->vm.s.pReqs, NULL, PVMREQ);
-        AssertMsg(!pReqHead, ("This isn't supposed to happen! VMR3Destroy caller has to serialize this.\n"));
+        PVMREQ pReqHead = ASMAtomicXchgPtrT(&pUVM->vm.s.pPriorityReqs, NULL, PVMREQ);
         if (!pReqHead)
-            break;
+        {
+            pReqHead = ASMAtomicXchgPtrT(&pUVM->vm.s.pNormalReqs, NULL, PVMREQ);
+            if (!pReqHead)
+                break;
+        }
+        AssertLogRelMsgFailed(("Requests pending! VMR3Destroy caller has to serialize this.\n"));
+
         for (PVMREQ pReq = pReqHead; pReq; pReq = pReq->pNext)
         {
@@ -2560,8 +2565,13 @@
         for (unsigned i = 0; i < 10; i++)
         {
-            PVMREQ pReqHead = ASMAtomicXchgPtrT(&pUVCpu->vm.s.pReqs, NULL, PVMREQ);
-            AssertMsg(!pReqHead, ("This isn't supposed to happen! VMR3Destroy caller has to serialize this.\n"));
+            PVMREQ pReqHead = ASMAtomicXchgPtrT(&pUVCpu->vm.s.pPriorityReqs, NULL, PVMREQ);
             if (!pReqHead)
-                break;
+            {
+                pReqHead = ASMAtomicXchgPtrT(&pUVCpu->vm.s.pNormalReqs, NULL, PVMREQ);
+                if (!pReqHead)
+                    break;
+            }
+            AssertLogRelMsgFailed(("Requests pending! VMR3Destroy caller has to serialize this.\n"));
+
             for (PVMREQ pReq = pReqHead; pReq; pReq = pReq->pNext)
             {
@@ -4431,5 +4441,5 @@
      *        offline and send it to SPIP wait.  Maybe modify VMCPUSTATE and push
      *        it out of the EM loops when offline. */
-    return VMR3ReqCallNoWaitU(pVM->pUVM, idCpu, (PFNRT)vmR3HotUnplugCpu, 2, pVM, idCpu);
+    return VMR3ReqCallNoWait(pVM, idCpu, (PFNRT)vmR3HotUnplugCpu, 2, pVM, idCpu);
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/VMEmt.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMEmt.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/VMEmt.cpp	(revision 38838)
@@ -113,5 +113,5 @@
              * See also VMR3Create
              */
-            if (    pUVM->vm.s.pReqs
+            if (    (pUVM->vm.s.pNormalReqs || pUVM->vm.s.pPriorityReqs)
                 &&  pUVCpu->idCpu == 0)
             {
@@ -119,13 +119,13 @@
                  * Service execute in any EMT request.
                  */
-                rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY);
+                rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY, false /*fPriorityOnly*/);
                 Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %s -> %s\n", rc, VMR3GetStateName(enmBefore), pUVM->pVM ? VMR3GetStateName(pUVM->pVM->enmVMState) : "CREATING"));
             }
-            else if (pUVCpu->vm.s.pReqs)
+            else if (pUVCpu->vm.s.pNormalReqs || pUVCpu->vm.s.pPriorityReqs)
             {
                 /*
                  * Service execute in specific EMT request.
                  */
-                rc = VMR3ReqProcessU(pUVM, pUVCpu->idCpu);
+                rc = VMR3ReqProcessU(pUVM, pUVCpu->idCpu, false /*fPriorityOnly*/);
                 Log(("vmR3EmulationThread: Req (cpu=%u) rc=%Rrc, VM state %s -> %s\n", pUVCpu->idCpu, rc, VMR3GetStateName(enmBefore), pUVM->pVM ? VMR3GetStateName(pUVM->pVM->enmVMState) : "CREATING"));
             }
@@ -164,18 +164,18 @@
                 Log(("vmR3EmulationThread: Rendezvous rc=%Rrc, VM state %s -> %s\n", rc, VMR3GetStateName(enmBefore), VMR3GetStateName(pVM->enmVMState)));
             }
-            else if (pUVM->vm.s.pReqs)
+            else if (pUVM->vm.s.pNormalReqs || pUVM->vm.s.pPriorityReqs)
             {
                 /*
                  * Service execute in any EMT request.
                  */
-                rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY);
+                rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY, false /*fPriorityOnly*/);
                 Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %s -> %s\n", rc, VMR3GetStateName(enmBefore), VMR3GetStateName(pVM->enmVMState)));
             }
-            else if (pUVCpu->vm.s.pReqs)
+            else if (pUVCpu->vm.s.pNormalReqs || pUVCpu->vm.s.pPriorityReqs)
             {
                 /*
                  * Service execute in specific EMT request.
                  */
-                rc = VMR3ReqProcessU(pUVM, pUVCpu->idCpu);
+                rc = VMR3ReqProcessU(pUVM, pUVCpu->idCpu, false /*fPriorityOnly*/);
                 Log(("vmR3EmulationThread: Req (cpu=%u) rc=%Rrc, VM state %s -> %s\n", pUVCpu->idCpu, rc, VMR3GetStateName(enmBefore), VMR3GetStateName(pVM->enmVMState)));
             }
@@ -847,7 +847,7 @@
          * Check Relevant FFs.
          */
-        if (pUVM->vm.s.pReqs)   /* global requests pending? */
-            break;
-        if (pUVCpu->vm.s.pReqs) /* local requests pending? */
+        if (pUVM->vm.s.pNormalReqs   || pUVM->vm.s.pPriorityReqs)   /* global requests pending? */
+            break;
+        if (pUVCpu->vm.s.pNormalReqs || pUVCpu->vm.s.pPriorityReqs) /* local requests pending? */
             break;
 
Index: /trunk/src/VBox/VMM/VMMR3/VMReq.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMReq.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/VMMR3/VMReq.cpp	(revision 38838)
@@ -122,40 +122,4 @@
  * Convenience wrapper for VMR3ReqCallU.
  *
- * This assumes (1) you're calling a function that returns an VBox status code,
- * (2) that you want it's return code on success, and (3) that you wish to wait
- * for ever for it to return.
- *
- * @returns VBox status code.  In the unlikely event that VMR3ReqCallVU fails,
- *          its status code is return.  Otherwise, the status of pfnFunction is
- *          returned.
- *
- * @param   pUVM            Pointer to the user mode VM structure.
- * @param   idDstCpu        The destination CPU(s). Either a specific CPU ID or
- *                          one of the following special values:
- *                              VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE.
- * @param   pfnFunction     Pointer to the function to call.
- * @param   cArgs           Number of arguments following in the ellipsis.
- * @param   ...             Function arguments.
- *
- * @remarks See remarks on VMR3ReqCallVU.
- */
-VMMR3DECL(int) VMR3ReqCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
-{
-    PVMREQ pReq;
-    va_list va;
-    va_start(va, cArgs);
-    int rc = VMR3ReqCallVU(pUVM, idDstCpu, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS,
-                           pfnFunction, cArgs, va);
-    va_end(va);
-    if (RT_SUCCESS(rc))
-        rc = pReq->iStatus;
-    VMR3ReqFree(pReq);
-    return rc;
-}
-
-
-/**
- * Convenience wrapper for VMR3ReqCallU.
- *
  * This assumes (1) you're calling a function that returns an VBox status code
  * and that you do not wish to wait for it to complete.
@@ -178,33 +142,4 @@
     va_start(va, cArgs);
     int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, NULL, 0, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_NO_WAIT,
-                           pfnFunction, cArgs, va);
-    va_end(va);
-    return rc;
-}
-
-
-/**
- * Convenience wrapper for VMR3ReqCallU.
- *
- * This assumes (1) you're calling a function that returns an VBox status code
- * and that you do not wish to wait for it to complete.
- *
- * @returns VBox status code returned by VMR3ReqCallVU.
- *
- * @param   pUVM            Pointer to the user mode VM structure.
- * @param   idDstCpu        The destination CPU(s). Either a specific CPU ID or
- *                          one of the following special values:
- *                              VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE.
- * @param   pfnFunction     Pointer to the function to call.
- * @param   cArgs           Number of arguments following in the ellipsis.
- * @param   ...             Function arguments.
- *
- * @remarks See remarks on VMR3ReqCallVU.
- */
-VMMR3DECL(int) VMR3ReqCallNoWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
-{
-    va_list va;
-    va_start(va, cArgs);
-    int rc = VMR3ReqCallVU(pUVM, idDstCpu, NULL, 0, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_NO_WAIT,
                            pfnFunction, cArgs, va);
     va_end(va);
@@ -248,35 +183,4 @@
  *
  * This assumes (1) you're calling a function that returns void, and (2) that
- * you wish to wait for ever for it to return.
- *
- * @returns VBox status code of VMR3ReqCallVU.
- *
- * @param   pUVM            Pointer to the user mode VM structure.
- * @param   idDstCpu        The destination CPU(s). Either a specific CPU ID or
- *                          one of the following special values:
- *                              VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE.
- * @param   pfnFunction     Pointer to the function to call.
- * @param   cArgs           Number of arguments following in the ellipsis.
- * @param   ...             Function arguments.
- *
- * @remarks See remarks on VMR3ReqCallVU.
- */
-VMMR3DECL(int) VMR3ReqCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
-{
-    PVMREQ pReq;
-    va_list va;
-    va_start(va, cArgs);
-    int rc = VMR3ReqCallVU(pUVM, idDstCpu, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VOID,
-                           pfnFunction, cArgs, va);
-    va_end(va);
-    VMR3ReqFree(pReq);
-    return rc;
-}
-
-
-/**
- * Convenience wrapper for VMR3ReqCallU.
- *
- * This assumes (1) you're calling a function that returns void, and (2) that
  * you do not wish to wait for it to complete.
  *
@@ -309,10 +213,14 @@
  * Convenience wrapper for VMR3ReqCallU.
  *
- * This assumes (1) you're calling a function that returns void, and (2) that
- * you do not wish to wait for it to complete.
- *
- * @returns VBox status code of VMR3ReqCallVU.
- *
- * @param   pUVM            Pointer to the user mode VM structure.
+ * This assumes (1) you're calling a function that returns an VBox status code,
+ * (2) that you want it's return code on success, (3) that you wish to wait for
+ * ever for it to return, and (4) that it's priority request that can be safely
+ * be handled during async suspend and power off. 
+ *
+ * @returns VBox status code.  In the unlikely event that VMR3ReqCallVU fails,
+ *          its status code is return.  Otherwise, the status of pfnFunction is
+ *          returned.
+ *
+ * @param   pVM             Pointer to the shared VM structure.
  * @param   idDstCpu        The destination CPU(s). Either a specific CPU ID or
  *                          one of the following special values:
@@ -324,10 +232,44 @@
  * @remarks See remarks on VMR3ReqCallVU.
  */
-VMMR3DECL(int) VMR3ReqCallVoidNoWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
+VMMR3DECL(int) VMR3ReqPriorityCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
 {
     PVMREQ pReq;
     va_list va;
     va_start(va, cArgs);
-    int rc = VMR3ReqCallVU(pUVM, idDstCpu, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VOID | VMREQFLAGS_NO_WAIT,
+    int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_PRIORITY,
+                           pfnFunction, cArgs, va);
+    va_end(va);
+    if (RT_SUCCESS(rc))
+        rc = pReq->iStatus;
+    VMR3ReqFree(pReq);
+    return rc;
+}
+
+
+/**
+ * Convenience wrapper for VMR3ReqCallU.
+ *
+ * This assumes (1) you're calling a function that returns void, (2) that you 
+ * wish to wait for ever for it to return, and (3) that it's priority request 
+ * that can be safely be handled during async suspend and power off. 
+ *
+ * @returns VBox status code of VMR3ReqCallVU.
+ *
+ * @param   pVM             Pointer to the shared VM structure.
+ * @param   idDstCpu        The destination CPU(s). Either a specific CPU ID or
+ *                          one of the following special values:
+ *                              VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE.
+ * @param   pfnFunction     Pointer to the function to call.
+ * @param   cArgs           Number of arguments following in the ellipsis.
+ * @param   ...             Function arguments.
+ *
+ * @remarks See remarks on VMR3ReqCallVU.
+ */
+VMMR3DECL(int) VMR3ReqPriorityCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
+{
+    PVMREQ pReq;
+    va_list va;
+    va_start(va, cArgs);
+    int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VOID | VMREQFLAGS_PRIORITY,
                            pfnFunction, cArgs, va);
     va_end(va);
@@ -424,5 +366,5 @@
     AssertPtrReturn(pfnFunction, VERR_INVALID_POINTER);
     AssertPtrReturn(pUVM, VERR_INVALID_POINTER);
-    AssertReturn(!(fFlags & ~(VMREQFLAGS_RETURN_MASK | VMREQFLAGS_NO_WAIT | VMREQFLAGS_POKE)), VERR_INVALID_PARAMETER);
+    AssertReturn(!(fFlags & ~(VMREQFLAGS_RETURN_MASK | VMREQFLAGS_NO_WAIT | VMREQFLAGS_POKE | VMREQFLAGS_PRIORITY)), VERR_INVALID_PARAMETER);
     if (!(fFlags & VMREQFLAGS_NO_WAIT) || ppReq)
     {
@@ -800,5 +742,5 @@
                      pReq->enmType, VMREQTYPE_INVALID + 1, VMREQTYPE_MAX - 1),
                     VERR_VM_REQUEST_INVALID_TYPE);
-    Assert(!(pReq->fFlags & ~(VMREQFLAGS_RETURN_MASK | VMREQFLAGS_NO_WAIT | VMREQFLAGS_POKE)));
+    Assert(!(pReq->fFlags & ~(VMREQFLAGS_RETURN_MASK | VMREQFLAGS_NO_WAIT | VMREQFLAGS_POKE | VMREQFLAGS_PRIORITY)));
 
     /*
@@ -853,12 +795,13 @@
          * Insert it.
          */
+        volatile PVMREQ *ppQueueHead = pReq->fFlags & VMREQFLAGS_PRIORITY ? &pUVCpu->vm.s.pPriorityReqs : &pUVCpu->vm.s.pNormalReqs;
         pReq->enmState = VMREQSTATE_QUEUED;
         PVMREQ pNext;
         do
         {
-            pNext = ASMAtomicUoReadPtrT(&pUVCpu->vm.s.pReqs, PVMREQ);
+            pNext = ASMAtomicUoReadPtrT(ppQueueHead, PVMREQ);
             ASMAtomicWritePtr(&pReq->pNext, pNext);
             ASMCompilerBarrier();
-        } while (!ASMAtomicCmpXchgPtr(&pUVCpu->vm.s.pReqs, pReq, pNext));
+        } while (!ASMAtomicCmpXchgPtr(ppQueueHead, pReq, pNext));
 
         /*
@@ -887,12 +830,13 @@
          * Insert it.
          */
+        volatile PVMREQ *ppQueueHead = pReq->fFlags & VMREQFLAGS_PRIORITY ? &pUVM->vm.s.pPriorityReqs : &pUVM->vm.s.pNormalReqs;
         pReq->enmState = VMREQSTATE_QUEUED;
         PVMREQ pNext;
         do
         {
-            pNext = ASMAtomicUoReadPtrT(&pUVM->vm.s.pReqs, PVMREQ);
+            pNext = ASMAtomicUoReadPtrT(ppQueueHead, PVMREQ);
             ASMAtomicWritePtr(&pReq->pNext, pNext);
             ASMCompilerBarrier();
-        } while (!ASMAtomicCmpXchgPtr(&pUVM->vm.s.pReqs, pReq, pNext));
+        } while (!ASMAtomicCmpXchgPtr(ppQueueHead, pReq, pNext));
 
         /*
@@ -989,4 +933,22 @@
 
 /**
+ * Sets the relevant FF. 
+ *  
+ * @param   pUVM            Pointer to the user mode VM structure.
+ * @param   idDstCpu        VMCPUID_ANY or the ID of the current CPU.
+ */
+DECLINLINE(void) vmR3ReqSetFF(PUVM pUVM, VMCPUID idDstCpu)
+{
+    if (RT_LIKELY(pUVM->pVM))
+    {
+        if (idDstCpu == VMCPUID_ANY)
+            VM_FF_SET(pUVM->pVM, VM_FF_REQUEST);
+        else
+            VMCPU_FF_SET(&pUVM->pVM->aCpus[idDstCpu], VMCPU_FF_REQUEST);
+    }
+}
+
+
+/**
  * VMR3ReqProcessU helper that handles cases where there are more than one
  * pending request.
@@ -1001,5 +963,8 @@
 {
     STAM_COUNTER_INC(&pUVM->vm.s.StatReqMoreThan1);
-    /* Chop off the last one (pReq). */
+
+    /* 
+     * Chop off the last one (pReq).
+     */
     PVMREQ pPrev;
     PVMREQ pReqRet = pReqList;
@@ -1011,5 +976,7 @@
     ASMAtomicWriteNullPtr(&pPrev->pNext);
 
-    /* Push the others back onto the list (end of it). */
+    /* 
+     * Push the others back onto the list (end of it).
+     */
     Log2(("VMR3ReqProcess: Pushing back %p %p...\n", pReqList, pReqList->pNext));
     if (RT_UNLIKELY(!ASMAtomicCmpXchgPtr(ppReqs, pReqList, NULL)))
@@ -1031,12 +998,5 @@
     }
 
-    if (RT_LIKELY(pUVM->pVM))
-    {
-        if (idDstCpu == VMCPUID_ANY)
-            VM_FF_SET(pUVM->pVM, VM_FF_REQUEST);
-        else
-            VMCPU_FF_SET(&pUVM->pVM->aCpus[idDstCpu], VMCPU_FF_REQUEST);
-    }
-
+    vmR3ReqSetFF(pUVM, idDstCpu);
     return pReqRet;
 }
@@ -1055,12 +1015,32 @@
  *                          and the CPU ID for a CPU specific one. In the latter
  *                          case the calling thread must be the EMT of that CPU.
+ * @param   fPriorityOnly   When set, only process the priority request queue. 
  *
  * @note    SMP safe (multiple EMTs trying to satisfy VM_FF_REQUESTs).
  *
- * @remarks This was made reentrant for
- */
-VMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu)
+ * @remarks This was made reentrant for async PDM handling, the debugger and 
+ *          others.
+ */
+VMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu, bool fPriorityOnly)
 {
     LogFlow(("VMR3ReqProcessU: (enmVMState=%d) idDstCpu=%d\n", pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING, idDstCpu));
+
+    /*
+     * Determine which queues to process.
+     */
+    PVMREQ volatile *ppNormalReqs;
+    PVMREQ volatile *ppPriorityReqs;
+    if (idDstCpu == VMCPUID_ANY)
+    {
+        ppPriorityReqs = &pUVM->vm.s.pPriorityReqs;
+        ppNormalReqs   = !fPriorityOnly ? &pUVM->vm.s.pNormalReqs                 : ppPriorityReqs;
+    }
+    else
+    {
+        Assert(idDstCpu < pUVM->cCpus);
+        Assert(pUVM->aCpus[idDstCpu].vm.s.NativeThreadEMT == RTThreadNativeSelf());
+        ppPriorityReqs = &pUVM->aCpus[idDstCpu].vm.s.pPriorityReqs;
+        ppNormalReqs   = !fPriorityOnly ? &pUVM->aCpus[idDstCpu].vm.s.pNormalReqs : ppPriorityReqs;
+    }
 
     /*
@@ -1074,29 +1054,33 @@
     {
         /*
-         * Get the pending requests.
+         * Get the pending requests. 
+         *  
          * If there are more than one request, unlink the oldest and put the
          * rest back so that we're reentrant.
          */
-        PVMREQ volatile *ppReqs;
-        if (idDstCpu == VMCPUID_ANY)
-        {
-            ppReqs = &pUVM->vm.s.pReqs;
-            if (RT_LIKELY(pUVM->pVM))
+        if (RT_LIKELY(pUVM->pVM))
+        {
+            if (idDstCpu == VMCPUID_ANY)
                 VM_FF_CLEAR(pUVM->pVM, VM_FF_REQUEST);
+            else
+                VMCPU_FF_CLEAR(&pUVM->pVM->aCpus[idDstCpu], VMCPU_FF_REQUEST);
+        }
+
+        PVMREQ pReq = ASMAtomicXchgPtrT(ppPriorityReqs, NULL, PVMREQ);
+        if (pReq)
+        {
+            if (RT_UNLIKELY(pReq->pNext))
+                pReq = vmR3ReqProcessUTooManyHelper(pUVM, idDstCpu, pReq, ppPriorityReqs);
+            else if (ASMAtomicReadPtrT(ppNormalReqs, PVMREQ))
+                vmR3ReqSetFF(pUVM, idDstCpu);
         }
         else
         {
-            Assert(idDstCpu < pUVM->cCpus);
-            Assert(pUVM->aCpus[idDstCpu].vm.s.NativeThreadEMT == RTThreadNativeSelf());
-            ppReqs = &pUVM->aCpus[idDstCpu].vm.s.pReqs;
-            if (RT_LIKELY(pUVM->pVM))
-                VMCPU_FF_CLEAR(&pUVM->pVM->aCpus[idDstCpu], VMCPU_FF_REQUEST);
+            pReq = ASMAtomicXchgPtrT(ppNormalReqs, NULL, PVMREQ);
+            if (!pReq)
+                break;
+            if (RT_UNLIKELY(pReq->pNext))
+                pReq = vmR3ReqProcessUTooManyHelper(pUVM, idDstCpu, pReq, ppNormalReqs);
         }
-
-        PVMREQ pReq = ASMAtomicXchgPtrT(ppReqs, NULL, PVMREQ);
-        if (!pReq)
-            break;
-        if (RT_UNLIKELY(pReq->pNext))
-            pReq = vmR3ReqProcessUTooManyHelper(pUVM, idDstCpu, pReq, ppReqs);
 
         /*
@@ -1129,4 +1113,19 @@
 {
     LogFlow(("vmR3ReqProcessOneU: pReq=%p type=%d fFlags=%#x\n", pReq, pReq->enmType, pReq->fFlags));
+
+#if 1 /*def VBOX_STRICT */
+    /*
+     * Disable rendezvous if servicing a priority request.  Priority requests 
+     * can not make use of the EMT rendezvous API. 
+     */
+    PVMCPU      pVCpu               = NULL;
+    bool        fSavedInRendezvous  = true;
+    bool const  fPriorityReq        = RT_BOOL(pReq->fFlags & VMREQFLAGS_PRIORITY);
+    if (fPriorityReq && pUVM->pVM)
+    {
+        pVCpu = VMMGetCpu(pUVM->pVM);
+        fSavedInRendezvous = VMMR3EmtRendezvousSetDisabled(pVCpu, true /*fDisabled*/);
+    }
+#endif
 
     /*
@@ -1265,4 +1264,12 @@
         }
     }
+
+#if 1 /*def VBOX_STRICT */
+    /*
+     * Restore the rendezvous disabled state.
+     */
+    if (!fSavedInRendezvous)
+        VMMR3EmtRendezvousSetDisabled(pVCpu, false /*fDisabled*/);
+#endif
     return rcRet;
 }
Index: /trunk/src/VBox/VMM/include/VMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/VMInternal.h	(revision 38837)
+++ /trunk/src/VBox/VMM/include/VMInternal.h	(revision 38838)
@@ -174,6 +174,8 @@
 typedef struct VMINTUSERPERVM
 {
-    /** Head of the request queue. Atomic. */
-    volatile PVMREQ                 pReqs;
+    /** Head of the standard request queue. Atomic. */
+    volatile PVMREQ                 pNormalReqs;
+    /** Head of the priority request queue. Atomic. */
+    volatile PVMREQ                 pPriorityReqs;
     /** The last index used during alloc/free. */
     volatile uint32_t               iReqFree;
@@ -315,6 +317,8 @@
 typedef struct VMINTUSERPERVMCPU
 {
-    /** Head of the request queue. Atomic. */
-    volatile PVMREQ                 pReqs;
+    /** Head of the normal request queue. Atomic. */
+    volatile PVMREQ                 pNormalReqs;
+    /** Head of the priority request queue. Atomic. */
+    volatile PVMREQ                 pPriorityReqs;
 
     /** The handle to the EMT thread. */
Index: /trunk/src/VBox/VMM/testcase/tstVMM.cpp
===================================================================
--- /trunk/src/VBox/VMM/testcase/tstVMM.cpp	(revision 38837)
+++ /trunk/src/VBox/VMM/testcase/tstVMM.cpp	(revision 38838)
@@ -274,5 +274,5 @@
                 for (VMCPUID idCpu = 1; idCpu < g_cCpus; idCpu++)
                 {
-                    rc = VMR3ReqCallNoWaitU(pVM->pUVM, idCpu, (PFNRT)tstTMWorker, 2, pVM, hTest);
+                    rc = VMR3ReqCallNoWait(pVM, idCpu, (PFNRT)tstTMWorker, 2, pVM, hTest);
                     if (RT_FAILURE(rc))
                         RTTestFailed(hTest, "VMR3ReqCall failed: rc=%Rrc\n", rc);
Index: /trunk/src/recompiler/VBoxREMWrapper.cpp
===================================================================
--- /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 38837)
+++ /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 38838)
@@ -1291,9 +1291,10 @@
     { "TRPMSetFaultAddress",                    VMM_FN(TRPMSetFaultAddress),            &g_aArgsTRPMSetFaultAddress[0],             RT_ELEMENTS(g_aArgsTRPMSetFaultAddress),               REMFNDESC_FLAGS_RET_VOID,   0,                  NULL },
     { "VMMGetCpu",                              VMM_FN(VMMGetCpu),                      &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_INT,    sizeof(PVMCPU),     NULL },
-    { "VMR3ReqCallWait",                        VMM_FN(VMR3ReqCallWait),                &g_aArgsVMR3ReqCallWait[0],                 RT_ELEMENTS(g_aArgsVMR3ReqCallWait),                   REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
-    { "VMR3ReqFree",                            VMM_FN(VMR3ReqFree),                    &g_aArgsVMR3ReqFree[0],                     RT_ELEMENTS(g_aArgsVMR3ReqFree),                       REMFNDESC_FLAGS_RET_INT | REMFNDESC_FLAGS_ELLIPSIS, sizeof(int), NULL },
+    { "VMR3ReqCallWait",                        VMM_FN(VMR3ReqCallWait),                &g_aArgsVMR3ReqCallWait[0],                 RT_ELEMENTS(g_aArgsVMR3ReqCallWait),                   REMFNDESC_FLAGS_RET_INT | REMFNDESC_FLAGS_ELLIPSIS, sizeof(int), NULL },
+    { "VMR3ReqPriorityCallWait",                VMM_FN(VMR3ReqPriorityCallWait),        &g_aArgsVMR3ReqCallWait[0],                 RT_ELEMENTS(g_aArgsVMR3ReqCallWait),                   REMFNDESC_FLAGS_RET_INT | REMFNDESC_FLAGS_ELLIPSIS, sizeof(int), NULL },
+    { "VMR3ReqFree",                            VMM_FN(VMR3ReqFree),                    &g_aArgsVMR3ReqFree[0],                     RT_ELEMENTS(g_aArgsVMR3ReqFree),                       REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
     { "VMR3GetVMCPUId",                         VMM_FN(VMR3GetVMCPUId),                 &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
     { "VMR3GetVMCPUNativeThread",               VMM_FN(VMR3GetVMCPUNativeThread),       &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_INT,    sizeof(void *),     NULL },
-    { "EMInterpretInstructionCPU",              VMM_FN(EMInterpretInstructionCPU),      &g_aArgsEMInterpretInstructionCPU[0],       RT_ELEMENTS(g_aArgsEMInterpretInstructionCPU),       REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
+    { "EMInterpretInstructionCPU",              VMM_FN(EMInterpretInstructionCPU),      &g_aArgsEMInterpretInstructionCPU[0],       RT_ELEMENTS(g_aArgsEMInterpretInstructionCPU),         REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
 //    { "",                        VMM_FN(),                &g_aArgsVM[0],                              RT_ELEMENTS(g_aArgsVM),                                REMFNDESC_FLAGS_RET_INT,    sizeof(int),   NULL },
 };
Index: /trunk/src/recompiler/VBoxRecompiler.c
===================================================================
--- /trunk/src/recompiler/VBoxRecompiler.c	(revision 38837)
+++ /trunk/src/recompiler/VBoxRecompiler.c	(revision 38838)
@@ -3922,5 +3922,5 @@
         return remR3DisasEnableStepping(pVM, fEnable);
 
-    rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)remR3DisasEnableStepping, 2, pVM, fEnable);
+    rc = VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)remR3DisasEnableStepping, 2, pVM, fEnable);
     AssertRC(rc);
     return rc;
