- Timestamp:
- May 1, 2009 6:06:59 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/types.h
r19285 r19300 99 99 typedef VMCPUID *PVMCPUID; 100 100 /** @name Special CPU ID values. 101 * Most of these are for request scheduling. 102 * 101 103 * @{ */ 102 104 /** All virtual CPUs. */ 103 #define VMCPUID_ALL UINT32_C(0xffffffff) 104 /** Any virtual CPU, preferrably an idle one. 105 #define VMCPUID_ALL UINT32_C(0xfffffff2) 106 /** All virtual CPUs, descending order. */ 107 #define VMCPUID_ALL_REVERSE UINT32_C(0xfffffff3) 108 /** Any virtual CPU. 105 109 * Intended for scheduling a VM request or some other task. */ 106 #define VMCPUID_ANY _IDLE UINT32_C(0xfffffffe)110 #define VMCPUID_ANY UINT32_C(0xfffffff4) 107 111 /** The NIL value. */ 108 #define NIL_VMCPUID UINT32_C(0xfffffff 0)112 #define NIL_VMCPUID UINT32_C(0xfffffffd) 109 113 /** @} */ 114 110 115 111 116 /** VM State -
trunk/include/VBox/vmapi.h
r19284 r19300 266 266 } VMREQFLAGS; 267 267 268 /**269 * Request destination270 */271 typedef enum VMREQDEST272 {273 /** Request packet for VCPU 0. */274 VMREQDEST_CPU0 = 0,275 276 /** Request packet for all VMCPU threads. */277 VMREQDEST_BROADCAST = 0x1000,278 279 /** Request packet for all VMCPU threads. (sent in reverse order) */280 VMREQDEST_BROADCAST_REVERSE = 0x1001,281 282 /** Request packet for any VMCPU thread. */283 VMREQDEST_ANY = 0x1002284 } VMREQDEST;285 286 /** Makes a VMREQDEST value from a VMCPU pointer. */287 #define VMREQDEST_FROM_VMCPU(pVCpu) ((VMREQDEST)(pVCpu)->idCpu)288 /** Makes a VMREQDEST value from a virtual CPU ID. */289 #define VMREQDEST_FROM_ID(idCpu) ((VMREQDEST)(idCpu))290 268 291 269 /** … … 318 296 VMREQTYPE enmType; 319 297 /** Request destination. */ 320 VM REQDEST enmDest;298 VMCPUID idDstCpu; 321 299 /** Request specific data. */ 322 300 union VMREQ_U … … 426 404 VMMR3DECL(int) VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser); 427 405 VMMR3DECL(int) VMR3SetRuntimeErrorWorker(PVM pVM); 428 VMMR3DECL(int) VMR3ReqCall(PVM pVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);429 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);430 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);431 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);432 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);433 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);434 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VM REQDEST enmDest);435 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VM REQDEST enmDest);406 VMMR3DECL(int) VMR3ReqCall(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 407 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 408 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 409 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 410 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 411 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args); 412 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu); 413 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu); 436 414 VMMR3DECL(int) VMR3ReqFree(PVMREQ pReq); 437 415 VMMR3DECL(int) VMR3ReqQueue(PVMREQ pReq, unsigned cMillies); 438 416 VMMR3DECL(int) VMR3ReqWait(PVMREQ pReq, unsigned cMillies); 439 VMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VM REQDEST enmDest);417 VMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu); 440 418 VMMR3DECL(void) VMR3NotifyGlobalFF(PVM pVM, bool fNotifiedREM); 441 419 VMMR3DECL(void) VMR3NotifyGlobalFFU(PUVM pUVM, bool fNotifiedREM); -
trunk/src/VBox/Devices/Storage/DevATA.cpp
r18927 r19300 1408 1408 1409 1409 pCtl->fRedoIdle = true; 1410 rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1410 rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1411 1411 (PFNRT)PDMDevHlpVMSuspend, 1, pDevIns); 1412 1412 AssertReleaseRC(rc); … … 2888 2888 2889 2889 PDMCritSectLeave(&pCtl->lock); 2890 rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,2890 rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 2891 2891 (PFNRT)s->pDrvMount->pfnUnmount, 2, s->pDrvMount, false); 2892 2892 AssertReleaseRC(rc); -
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r18668 r19300 249 249 PVMREQ pReq; 250 250 251 rc = VMR3ReqCallVoid (pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,251 rc = VMR3ReqCallVoid (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 252 252 (PFNRT) vmmdevCtlGuestFilterMask_EMT, 253 253 3, pVMMDevState, u32OrMask, u32NotMask); … … 274 274 * about something, which has already happened. 275 275 */ 276 rc = VMR3ReqCallEx(pVM, VM REQDEST_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,276 rc = VMR3ReqCallEx(pVM, VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, 277 277 (PFNRT) vmmdevNotifyGuest_EMT, 278 278 2, pVMMDevState, u32EventMask); -
trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
r18435 r19300 1138 1138 1139 1139 /* Not safe to execute asynchroneously; forward to EMT */ 1140 int rc = VMR3ReqCallEx(PDMDevHlpGetVM(pVMMDevState->pDevIns), VM REQDEST_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,1140 int rc = VMR3ReqCallEx(PDMDevHlpGetVM(pVMMDevState->pDevIns), VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, 1141 1141 (PFNRT)hgcmCompletedWorker, 3, pInterface, result, pCmd); 1142 1142 AssertRC(rc); -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r14295 r19300 378 378 /* pdm.h says that this has to be called from the EMT thread */ 379 379 PVMREQ pReq; 380 int rcVBox = VMR3ReqCallVoid(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,380 int rcVBox = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 381 381 (PFNRT)VMDisplay::doInvalidateAndUpdate, 1, mpDrv); 382 382 if (RT_SUCCESS(rcVBox)) -
trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp
r17339 r19300 244 244 LogFlowMember (("Console::AttachUSBDevice: Proxying USB device '%s' %RTuuid...\n", Address.c_str(), &Uuid)); 245 245 PVMREQ pReq; 246 vrc = VMR3ReqCall (mpVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,246 vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 247 247 (PFNRT)pRhConfig->pfnCreateProxyDevice, 248 248 5, pRhConfig, &Uuid, fRemote, … … 303 303 LogFlowMember (("Console::DetachUSBDevice: Detaching USB proxy device %RTuuid...\n", &Uuid)); 304 304 PVMREQ pReq; 305 vrc = VMR3ReqCall (mpVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)pRhConfig->pfnDestroyProxyDevice,305 vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)pRhConfig->pfnDestroyProxyDevice, 306 306 2, pRhConfig, &Uuid); 307 307 if (RT_SUCCESS (vrc)) -
trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp
r13837 r19300 138 138 PVMREQ pReq; 139 139 EMRAWMODE rawModeFlag = enable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE; 140 int rcVBox = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,140 int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 141 141 (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag); 142 142 if (RT_SUCCESS(rcVBox)) … … 198 198 PVMREQ pReq; 199 199 EMRAWMODE rawModeFlag = enable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE; 200 int rcVBox = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,200 int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 201 201 (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag); 202 202 if (RT_SUCCESS(rcVBox)) -
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r18645 r19300 966 966 /* Power off VM */ 967 967 PVMREQ pReq; 968 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);968 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM); 969 969 } 970 970 … … 1278 1278 { 1279 1279 startProgressInfo("Restoring"); 1280 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1280 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1281 1281 (PFNRT)VMR3Load, 4, pVM, g_pszStateFile, &callProgressInfo, (uintptr_t)NULL); 1282 1282 endProgressInfo(); … … 1284 1284 { 1285 1285 VMR3ReqFree(pReq); 1286 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1286 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1287 1287 (PFNRT)VMR3Resume, 1, pVM); 1288 1288 if (RT_SUCCESS(rc)) … … 1298 1298 else 1299 1299 { 1300 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);1300 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM); 1301 1301 if (RT_SUCCESS(rc)) 1302 1302 { -
trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp
r15256 r19300 63 63 64 64 PVMREQ pReq; 65 int rcVBox = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,65 int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 66 66 (PFNRT)VMR3Suspend, 1, pVM); 67 67 AssertRC(rcVBox); … … 84 84 85 85 PVMREQ pReq; 86 int rcVBox = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,86 int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 87 87 (PFNRT)VMR3Resume, 1, pVM); 88 88 AssertRC(rcVBox); … … 102 102 { 103 103 PVMREQ pReq; 104 int rcVBox = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,104 int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 105 105 (PFNRT)VMR3Reset, 1, pVM); 106 106 AssertRC(rcVBox); … … 160 160 161 161 startProgressInfo("Saving"); 162 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,162 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 163 163 (PFNRT)VMR3Save, 4, pVM, g_pszStateFile, &callProgressInfo, (uintptr_t)NULL); 164 164 endProgressInfo(); … … 193 193 { 194 194 PVMREQ pReq; 195 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,195 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 196 196 (PFNRT)VMR3Suspend, 1, pVM); 197 197 AssertRC(rc); -
trunk/src/VBox/Main/ConsoleImpl.cpp
r19289 r19300 2794 2794 */ 2795 2795 PVMREQ pReq; 2796 int vrc = VMR3ReqCall (mpVM, VM REQDEST_ANY, &pReq, 0 /* no wait! */,2796 int vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, 0 /* no wait! */, 2797 2797 (PFNRT) Console::changeDrive, 8, 2798 2798 this, pszDevice, uInstance, uLun, eState, peState, … … 5496 5496 /** @todo just do everything here and only wrap the PDMR3Usb call. That'll offload some notification stuff from the EMT thread. */ 5497 5497 PVMREQ pReq = NULL; 5498 int vrc = VMR3ReqCall (mpVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,5498 int vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 5499 5499 (PFNRT) usbAttachCallback, 6, this, aHostDevice, uuid.ptr(), fRemote, Address.raw(), aMaskedIfs); 5500 5500 if (VBOX_SUCCESS (vrc)) … … 5621 5621 PVMREQ pReq; 5622 5622 /** @todo just do everything here and only wrap the PDMR3Usb call. That'll offload some notification stuff from the EMT thread. */ 5623 int vrc = VMR3ReqCall (mpVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,5623 int vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 5624 5624 (PFNRT) usbDetachCallback, 4, 5625 5625 this, &aIt, (*aIt)->id().raw()); … … 6980 6980 * to access Console. 6981 6981 */ 6982 int vrc = VMR3ReqCall (that->mpVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,6982 int vrc = VMR3ReqCall (that->mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 6983 6983 (PFNRT)reconfigureHardDisks, 5, that->mpVM, lInstance, 6984 6984 enmController, atts [i], &rc); -
trunk/src/VBox/Main/DisplayImpl.cpp
r18669 r19300 1385 1385 /* send request to the EMT thread */ 1386 1386 PVMREQ pReq = NULL; 1387 int vrc = VMR3ReqCall (pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1387 int vrc = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1388 1388 (PFNRT) changeFramebuffer, 4, 1389 1389 this, static_cast <IFramebuffer *> (frameBuf), … … 1472 1472 /* send request to the EMT thread */ 1473 1473 PVMREQ pReq = NULL; 1474 int vrc = VMR3ReqCall (pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1474 int vrc = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1475 1475 (PFNRT) changeFramebuffer, 4, this, frameBuf, false /* aInternal */, 1476 1476 VBOX_VIDEO_PRIMARY_SCREEN); … … 1515 1515 /* send request to the EMT thread */ 1516 1516 PVMREQ pReq = NULL; 1517 int vrc = VMR3ReqCall (pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1517 int vrc = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1518 1518 (PFNRT) changeFramebuffer, 4, this, aFramebuffer, false /* aInternal */, 1519 1519 aScreenId); … … 1673 1673 PVMREQ pReq; 1674 1674 size_t cbData = RT_ALIGN_Z(width, 4) * 4 * height; 1675 rcVBox = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1675 rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1676 1676 (PFNRT)mpDrv->pUpPort->pfnSnapshot, 6, mpDrv->pUpPort, 1677 1677 address, cbData, (uintptr_t)NULL, (uintptr_t)NULL, (uintptr_t)NULL); … … 1733 1733 */ 1734 1734 PVMREQ pReq; 1735 int rcVBox = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1735 int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1736 1736 (PFNRT)mpDrv->pUpPort->pfnDisplayBlt, 6, mpDrv->pUpPort, 1737 1737 address, x, y, width, height); … … 1796 1796 /* pdm.h says that this has to be called from the EMT thread */ 1797 1797 PVMREQ pReq; 1798 int rcVBox = VMR3ReqCallVoid(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,1798 int rcVBox = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 1799 1799 (PFNRT)mpDrv->pUpPort->pfnUpdateDisplayAll, 1, mpDrv->pUpPort); 1800 1800 if (RT_SUCCESS(rcVBox)) -
trunk/src/VBox/Main/MachineDebuggerImpl.cpp
r18927 r19300 200 200 PVMREQ pReq; 201 201 EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE; 202 int rcVBox = VMR3ReqCall (pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,202 int rcVBox = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 203 203 (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 204 204 if (RT_SUCCESS (rcVBox)) … … 268 268 PVMREQ pReq; 269 269 EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE; 270 int rcVBox = VMR3ReqCall (pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,270 int rcVBox = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 271 271 (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 272 272 if (RT_SUCCESS (rcVBox)) -
trunk/src/VBox/VMM/DBGF.cpp
r19286 r19300 632 632 { 633 633 LogFlow(("dbgfR3VMMWait: Processes requests...\n")); 634 rc = VMR3ReqProcessU(pVM->pUVM, VM REQDEST_ANY);634 rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY); 635 635 LogFlow(("dbgfR3VMMWait: VMR3ReqProcess -> %Rrc rcRet=%Rrc\n", rc, rcRet)); 636 636 if (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST) … … 846 846 */ 847 847 PVMREQ pReq; 848 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3Attach, 1, pVM);848 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3Attach, 1, pVM); 849 849 if (RT_SUCCESS(rc)) 850 850 rc = pReq->iStatus; -
trunk/src/VBox/VMM/DBGFAddr.cpp
r19293 r19300 235 235 { 236 236 PVMREQ pReq = NULL; 237 rc = VMR3ReqCall(pVCpu->pVMR3, VMREQDEST_FROM_VMCPU(pVCpu), &pReq, RT_INDEFINITE_WAIT,237 rc = VMR3ReqCall(pVCpu->pVMR3, pVCpu->idCpu, &pReq, RT_INDEFINITE_WAIT, 238 238 (PFNRT)dbgfR3AddrToPhysOnVCpu, 3, pVCpu, pAddress, pGCPhys); 239 239 if (RT_SUCCESS(rc)) … … 400 400 */ 401 401 PVMREQ pReq = NULL; 402 int rc = VMR3ReqCall(pVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT,402 int rc = VMR3ReqCall(pVM, idCpu, &pReq, RT_INDEFINITE_WAIT, 403 403 (PFNRT)dbgfR3AddrToVolatileR3PtrOnVCpu, 5, pVM, idCpu, pAddress, fReadOnly, ppvR3Ptr); 404 404 if (RT_SUCCESS(rc)) -
trunk/src/VBox/VMM/DBGFBp.cpp
r19286 r19300 288 288 */ 289 289 PVMREQ pReq; 290 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetInt3, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);290 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetInt3, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp); 291 291 if (RT_SUCCESS(rc)) 292 292 rc = pReq->iStatus; … … 449 449 */ 450 450 PVMREQ pReq; 451 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetReg, 7, pVM, pAddress, &iHitTrigger, &iHitDisable, fType, cb, piBp);451 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetReg, 7, pVM, pAddress, &iHitTrigger, &iHitDisable, fType, cb, piBp); 452 452 if (RT_SUCCESS(rc)) 453 453 rc = pReq->iStatus; … … 620 620 */ 621 621 PVMREQ pReq; 622 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetREM, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);622 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetREM, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp); 623 623 if (RT_SUCCESS(rc)) 624 624 rc = pReq->iStatus; … … 716 716 */ 717 717 PVMREQ pReq; 718 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpClear, 2, pVM, iBp);718 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpClear, 2, pVM, iBp); 719 719 if (RT_SUCCESS(rc)) 720 720 rc = pReq->iStatus; … … 793 793 */ 794 794 PVMREQ pReq; 795 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnable, 2, pVM, iBp);795 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnable, 2, pVM, iBp); 796 796 if (RT_SUCCESS(rc)) 797 797 rc = pReq->iStatus; … … 870 870 */ 871 871 PVMREQ pReq; 872 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpDisable, 2, pVM, iBp);872 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpDisable, 2, pVM, iBp); 873 873 if (RT_SUCCESS(rc)) 874 874 rc = pReq->iStatus; … … 946 946 */ 947 947 PVMREQ pReq; 948 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnum, 3, pVM, pfnCallback, pvUser);948 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnum, 3, pVM, pfnCallback, pvUser); 949 949 if (RT_SUCCESS(rc)) 950 950 rc = pReq->iStatus; -
trunk/src/VBox/VMM/DBGFDisas.cpp
r19294 r19300 552 552 { 553 553 PVMREQ pReq = NULL; 554 rc = VMR3ReqCall(pVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT,554 rc = VMR3ReqCall(pVM, idCpu, &pReq, RT_INDEFINITE_WAIT, 555 555 (PFNRT)dbgfR3DisasInstrExOnVCpu, 8, 556 556 pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cchOutput, pcbInstr); -
trunk/src/VBox/VMM/DBGFInfo.cpp
r13818 r19300 717 717 case DBGFINFOTYPE_DEV: 718 718 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 719 rc = VMR3ReqCallVoid(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Dev.pfnHandler, 3, Info.u.Dev.pDevIns, pHlp, pszArgs);719 rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Dev.pfnHandler, 3, Info.u.Dev.pDevIns, pHlp, pszArgs); 720 720 else 721 721 Info.u.Dev.pfnHandler(Info.u.Dev.pDevIns, pHlp, pszArgs); … … 724 724 case DBGFINFOTYPE_DRV: 725 725 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 726 rc = VMR3ReqCallVoid(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Drv.pfnHandler, 3, Info.u.Drv.pDrvIns, pHlp, pszArgs);726 rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Drv.pfnHandler, 3, Info.u.Drv.pDrvIns, pHlp, pszArgs); 727 727 else 728 728 Info.u.Drv.pfnHandler(Info.u.Drv.pDrvIns, pHlp, pszArgs); … … 731 731 case DBGFINFOTYPE_INT: 732 732 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 733 rc = VMR3ReqCallVoid(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Int.pfnHandler, 3, pVM, pHlp, pszArgs);733 rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Int.pfnHandler, 3, pVM, pHlp, pszArgs); 734 734 else 735 735 Info.u.Int.pfnHandler(pVM, pHlp, pszArgs); … … 738 738 case DBGFINFOTYPE_EXT: 739 739 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 740 rc = VMR3ReqCallVoid(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Ext.pfnHandler, 3, Info.u.Ext.pvUser, pHlp, pszArgs);740 rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Ext.pfnHandler, 3, Info.u.Ext.pvUser, pHlp, pszArgs); 741 741 else 742 742 Info.u.Ext.pfnHandler(Info.u.Ext.pvUser, pHlp, pszArgs); -
trunk/src/VBox/VMM/DBGFLog.cpp
r13816 r19300 53 53 54 54 PVMREQ pReq; 55 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyGroups, 2, pVM, pszGroupSettings);55 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyGroups, 2, pVM, pszGroupSettings); 56 56 if (RT_SUCCESS(rc)) 57 57 rc = pReq->iStatus; … … 90 90 91 91 PVMREQ pReq; 92 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyFlags, 2, pVM, pszFlagSettings);92 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyFlags, 2, pVM, pszFlagSettings); 93 93 if (RT_SUCCESS(rc)) 94 94 rc = pReq->iStatus; … … 127 127 128 128 PVMREQ pReq; 129 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyDestinations, 2, pVM, pszDestSettings);129 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyDestinations, 2, pVM, pszDestSettings); 130 130 if (RT_SUCCESS(rc)) 131 131 rc = pReq->iStatus; -
trunk/src/VBox/VMM/DBGFMem.cpp
r19293 r19300 123 123 124 124 PVMREQ pReq; 125 int rc = VMR3ReqCall(pVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT,125 int rc = VMR3ReqCall(pVM, idCpu, &pReq, RT_INDEFINITE_WAIT, 126 126 (PFNRT)dbgfR3MemScan, 7, pVM, idCpu, pAddress, &cbRange, pabNeedle, cbNeedle, pHitAddress); 127 127 if (RT_SUCCESS(rc)) … … 205 205 206 206 PVMREQ pReq; 207 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT, 0,207 int rc = VMR3ReqCallU(pVM->pUVM, idCpu, &pReq, RT_INDEFINITE_WAIT, 0, 208 208 (PFNRT)dbgfR3MemRead, 5, pVM, idCpu, pAddress, pvBuf, cbRead); 209 209 if (RT_SUCCESS(rc)) … … 290 290 */ 291 291 PVMREQ pReq; 292 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT, 0,292 int rc = VMR3ReqCallU(pVM->pUVM, idCpu, &pReq, RT_INDEFINITE_WAIT, 0, 293 293 (PFNRT)dbgfR3MemReadString, 5, pVM, idCpu, pAddress, pszBuf, cchBuf); 294 294 if (RT_SUCCESS(rc)) … … 373 373 374 374 PVMREQ pReq; 375 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT, 0,375 int rc = VMR3ReqCallU(pVM->pUVM, idCpu, &pReq, RT_INDEFINITE_WAIT, 0, 376 376 (PFNRT)dbgfR3MemWrite, 5, pVM, idCpu, pAddress, pvBuf, cbWrite); 377 377 if (RT_SUCCESS(rc)) -
trunk/src/VBox/VMM/DBGFOS.cpp
r13782 r19300 115 115 */ 116 116 PVMREQ pReq; 117 int rc = VMR3ReqCallU(pVM->pUVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSRegister, 2, pVM, pReg);117 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSRegister, 2, pVM, pReg); 118 118 if (RT_SUCCESS(rc)) 119 119 rc = pReq->iStatus; … … 223 223 */ 224 224 PVMREQ pReq; 225 int rc = VMR3ReqCallU(pVM->pUVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSDetect, 3, pVM, pszName, cchName);225 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSDetect, 3, pVM, pszName, cchName); 226 226 if (RT_SUCCESS(rc)) 227 227 rc = pReq->iStatus; … … 307 307 */ 308 308 PVMREQ pReq; 309 int rc = VMR3ReqCallU(pVM->pUVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSQueryNameAndVersion,309 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSQueryNameAndVersion, 310 310 5, pVM, pszName, cchName, pszVersion, cchVersion); 311 311 if (RT_SUCCESS(rc)) … … 358 358 void *pvIf = NULL; 359 359 PVMREQ pReq; 360 VMR3ReqCallVoidU(pVM->pUVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf);360 VMR3ReqCallVoidU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf); 361 361 VMR3ReqFree(pReq); 362 362 -
trunk/src/VBox/VMM/DBGFStack.cpp
r19293 r19300 400 400 : CPUMGetHyperCtxCore(VMMGetCpuById(pVM, idCpu)); 401 401 PVMREQ pReq; 402 int rc = VMR3ReqCall(pVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT,402 int rc = VMR3ReqCall(pVM, idCpu, &pReq, RT_INDEFINITE_WAIT, 403 403 (PFNRT)dbgfR3StackWalkCtxFull, 9, 404 404 pVM, idCpu, pCtxCore, fGuest, -
trunk/src/VBox/VMM/EM.cpp
r19298 r19300 3390 3390 if (VM_FF_IS_PENDING_EXCEPT(pVM, VM_FF_REQUEST, VM_FF_PGM_NO_MEMORY)) 3391 3391 { 3392 rc2 = VMR3ReqProcessU(pVM->pUVM, VM REQDEST_ANY);3392 rc2 = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY); 3393 3393 if (rc2 == VINF_EM_OFF || rc2 == VINF_EM_TERMINATE) 3394 3394 { … … 3424 3424 if (VMCPU_FF_IS_PENDING_EXCEPT(pVCpu, VMCPU_FF_REQUEST, VM_FF_PGM_NO_MEMORY)) 3425 3425 { 3426 rc2 = VMR3ReqProcessU(pVM->pUVM, (VMREQDEST)pVCpu->idCpu);3426 rc2 = VMR3ReqProcessU(pVM->pUVM, pVCpu->idCpu); 3427 3427 if (rc2 == VINF_EM_OFF || rc2 == VINF_EM_TERMINATE) 3428 3428 { -
trunk/src/VBox/VMM/PATM/CSAM.cpp
r19263 r19300 1979 1979 Log(("CSAMCodePageWriteHandler: delayed write!\n")); 1980 1980 AssertCompileSize(RTRCPTR, 4); 1981 rc = VMR3ReqCallEx(pVM, VM REQDEST_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,1981 rc = VMR3ReqCallEx(pVM, VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, 1982 1982 (PFNRT)CSAMDelayedWriteHandler, 3, pVM, (RTRCPTR)GCPtr, cbBuf); 1983 1983 } -
trunk/src/VBox/VMM/PGMPhys.cpp
r18927 r19300 149 149 150 150 PVMREQ pReq = NULL; 151 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,151 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 152 152 (PFNRT)pgmR3PhysReadExternalEMT, 4, pVM, &GCPhys, pvBuf, cbRead); 153 153 if (RT_SUCCESS(rc)) … … 285 285 286 286 PVMREQ pReq = NULL; 287 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,287 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 288 288 (PFNRT)pgmR3PhysWriteExternalEMT, 4, pVM, &GCPhys, pvBuf, cbWrite); 289 289 if (RT_SUCCESS(rc)) … … 447 447 448 448 PVMREQ pReq = NULL; 449 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,449 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 450 450 (PFNRT)pgmR3PhysGCPhys2CCPtrDelegated, 4, pVM, &GCPhys, ppv, pLock); 451 451 if (RT_SUCCESS(rc)) -
trunk/src/VBox/VMM/PGMPool.cpp
r19141 r19300 533 533 if (!pPage->fReusedFlushPending) 534 534 { 535 int rc = VMR3ReqCallEx(pPool->pVMR3, VM REQDEST_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, (PFNRT)pgmR3PoolFlushReusedPage, 2, pPool, pPage);535 int rc = VMR3ReqCallEx(pPool->pVMR3, VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, (PFNRT)pgmR3PoolFlushReusedPage, 2, pPool, pPage); 536 536 AssertRCReturn(rc, rc); 537 537 pPage->fReusedFlushPending = true; -
trunk/src/VBox/VMM/VM.cpp
r19293 r19300 239 239 */ 240 240 PVMREQ pReq; 241 rc = VMR3ReqCallU(pUVM, VM REQDEST_ANY /* can't use CPU0 here as it's too early (pVM==0) */, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3CreateU,241 rc = VMR3ReqCallU(pUVM, VMCPUID_ANY /* can't use CPU0 here as it's too early (pVM==0) */, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3CreateU, 242 242 4, pUVM, cCPUs, pfnCFGMConstructor, pvUserCFGM); 243 243 if (RT_SUCCESS(rc)) … … 1035 1035 */ 1036 1036 PVMREQ pReq; 1037 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOn, 1, pVM);1037 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOn, 1, pVM); 1038 1038 if (RT_SUCCESS(rc)) 1039 1039 { … … 1105 1105 */ 1106 1106 PVMREQ pReq; 1107 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Suspend, 1, pVM);1107 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Suspend, 1, pVM); 1108 1108 if (RT_SUCCESS(rc)) 1109 1109 { … … 1192 1192 */ 1193 1193 PVMREQ pReq; 1194 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Resume, 1, pVM);1194 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Resume, 1, pVM); 1195 1195 if (RT_SUCCESS(rc)) 1196 1196 { … … 1273 1273 */ 1274 1274 PVMREQ pReq; 1275 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Save, 4, pVM, pszFilename, pfnProgress, pvUser);1275 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Save, 4, pVM, pszFilename, pfnProgress, pvUser); 1276 1276 if (RT_SUCCESS(rc)) 1277 1277 { … … 1368 1368 */ 1369 1369 PVMREQ pReq; 1370 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Load, 4, pVM, pszFilename, pfnProgress, pvUser);1370 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Load, 4, pVM, pszFilename, pfnProgress, pvUser); 1371 1371 if (RT_SUCCESS(rc)) 1372 1372 { … … 1457 1457 */ 1458 1458 PVMREQ pReq; 1459 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOff, 1, pVM);1459 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOff, 1, pVM); 1460 1460 if (RT_SUCCESS(rc)) 1461 1461 { … … 1630 1630 */ 1631 1631 PVMREQ pReq = NULL; 1632 int rc = VMR3ReqCallU(pUVM, VM REQDEST_BROADCAST_REVERSE, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3Destroy, 1, pVM);1632 int rc = VMR3ReqCallU(pUVM, VMCPUID_ALL_REVERSE, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3Destroy, 1, pVM); 1633 1633 if (RT_SUCCESS(rc)) 1634 1634 rc = pReq->iStatus; … … 2077 2077 */ 2078 2078 PVMREQ pReq = NULL; 2079 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, 0, (PFNRT)vmR3Reset, 1, pVM);2079 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, 0, (PFNRT)vmR3Reset, 1, pVM); 2080 2080 while (rc == VERR_TIMEOUT) 2081 2081 rc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); … … 2597 2597 */ 2598 2598 PVMREQ pReq; 2599 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateRegisterU, 3, pVM->pUVM, pfnAtState, pvUser);2599 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateRegisterU, 3, pVM->pUVM, pfnAtState, pvUser); 2600 2600 if (RT_FAILURE(rc)) 2601 2601 return rc; … … 2666 2666 */ 2667 2667 PVMREQ pReq; 2668 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateDeregisterU, 3, pVM->pUVM, pfnAtState, pvUser);2668 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateDeregisterU, 3, pVM->pUVM, pfnAtState, pvUser); 2669 2669 if (RT_FAILURE(rc)) 2670 2670 return rc; … … 2768 2768 */ 2769 2769 PVMREQ pReq; 2770 int rc = VMR3ReqCallU(pUVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3AtErrorRegisterU, 3, pUVM, pfnAtError, pvUser);2770 int rc = VMR3ReqCallU(pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3AtErrorRegisterU, 3, pUVM, pfnAtError, pvUser); 2771 2771 if (RT_FAILURE(rc)) 2772 2772 return rc; … … 2837 2837 */ 2838 2838 PVMREQ pReq; 2839 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtErrorDeregisterU, 3, pVM->pUVM, pfnAtError, pvUser);2839 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtErrorDeregisterU, 3, pVM->pUVM, pfnAtError, pvUser); 2840 2840 if (RT_FAILURE(rc)) 2841 2841 return rc; … … 3053 3053 */ 3054 3054 PVMREQ pReq; 3055 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorRegisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser);3055 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorRegisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser); 3056 3056 if (RT_FAILURE(rc)) 3057 3057 return rc; … … 3122 3122 */ 3123 3123 PVMREQ pReq; 3124 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorDeregisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser);3124 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorDeregisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser); 3125 3125 if (RT_FAILURE(rc)) 3126 3126 return rc; -
trunk/src/VBox/VMM/VMEmt.cpp
r19299 r19300 101 101 * Service execute in EMT request. 102 102 */ 103 rc = VMR3ReqProcessU(pUVM, VM REQDEST_ANY);103 rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY); 104 104 Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %d -> %d\n", rc, enmBefore, pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING)); 105 105 } … … 110 110 * Service execute in EMT request. 111 111 */ 112 rc = VMR3ReqProcessU(pUVM, (VMREQDEST)pUVCpu->idCpu);113 Log(("vmR3EmulationThread: Req (cpu=% d) rc=%Rrc, VM state %d -> %d\n", pUVCpu->idCpu, rc, enmBefore, pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING));112 rc = VMR3ReqProcessU(pUVM, pUVCpu->idCpu); 113 Log(("vmR3EmulationThread: Req (cpu=%u) rc=%Rrc, VM state %d -> %d\n", pUVCpu->idCpu, rc, enmBefore, pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING)); 114 114 } 115 115 else … … 145 145 * Service execute in EMT request. 146 146 */ 147 rc = VMR3ReqProcessU(pUVM, VM REQDEST_ANY);147 rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY); 148 148 Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %d -> %d\n", rc, enmBefore, pVM->enmVMState)); 149 149 } … … 153 153 * Service execute in EMT request. 154 154 */ 155 rc = VMR3ReqProcessU(pUVM, (VMREQDEST)pUVCpu->idCpu);156 Log(("vmR3EmulationThread: Req (cpu=% d)rc=%Rrc, VM state %d -> %d\n", pUVCpu->idCpu, rc, enmBefore, pVM->enmVMState));155 rc = VMR3ReqProcessU(pUVM, pUVCpu->idCpu); 156 Log(("vmR3EmulationThread: Req (cpu=%u) rc=%Rrc, VM state %d -> %d\n", pUVCpu->idCpu, rc, enmBefore, pVM->enmVMState)); 157 157 } 158 158 else if (VM_FF_ISSET(pVM, VM_FF_DBGF)) … … 280 280 * Service execute in EMT request. 281 281 */ 282 rc = VMR3ReqProcessU(pUVM, VM REQDEST_ANY);282 rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY); 283 283 Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %d -> %d\n", rc, enmBefore, pVM->enmVMState)); 284 284 } … … 288 288 * Service execute in EMT request. 289 289 */ 290 rc = VMR3ReqProcessU(pUVM, (VMREQDEST)pUVCpu->idCpu);291 Log(("vmR3EmulationThread: Req (cpu=% d)rc=%Rrc, VM state %d -> %d\n", pUVCpu->idCpu, rc, enmBefore, pVM->enmVMState));290 rc = VMR3ReqProcessU(pUVM, pUVCpu->idCpu); 291 Log(("vmR3EmulationThread: Req (cpu=%u) rc=%Rrc, VM state %d -> %d\n", pUVCpu->idCpu, rc, enmBefore, pVM->enmVMState)); 292 292 } 293 293 else if (VM_FF_ISSET(pVM, VM_FF_DBGF)) -
trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp
r19217 r19300 192 192 #else /* IN_RING3: */ 193 193 PVMREQ pReq; 194 VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PDMR3QueueFlushWorker, 2, pVM, pQueue);194 VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PDMR3QueueFlushWorker, 2, pVM, pQueue); 195 195 VMR3ReqFree(pReq); 196 196 #endif -
trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp
r19217 r19300 661 661 #ifdef IN_RING3 662 662 PVMREQ pReq; 663 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)tmVirtualSetWarpDrive, 2, pVM, u32Percent);663 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)tmVirtualSetWarpDrive, 2, pVM, u32Percent); 664 664 if (RT_SUCCESS(rc)) 665 665 rc = pReq->iStatus; -
trunk/src/VBox/VMM/VMMAll/VMAll.cpp
r18649 r19300 86 86 va_copy(va2, args); /* Have to make a copy here or GCC will break. */ 87 87 PVMREQ pReq; 88 VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3SetErrorUV, 7, /* ASSUMES 3 source pos args! */88 VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3SetErrorUV, 7, /* ASSUMES 3 source pos args! */ 89 89 pVM->pUVM, rc, RT_SRC_POS_ARGS, pszFormat, &va2); 90 90 VMR3ReqFree(pReq); … … 269 269 || VM_IS_EMT(pVM)) 270 270 { 271 rc = VMR3ReqCallU(pVM->pUVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS,271 rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 272 272 (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2); 273 273 if (RT_SUCCESS(rc)) … … 275 275 } 276 276 else 277 rc = VMR3ReqCallU(pVM->pUVM, VM REQDEST_ANY, &pReq, 0, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_NO_WAIT,277 rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, 0, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_NO_WAIT, 278 278 (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2); 279 279 VMR3ReqFree(pReq); -
trunk/src/VBox/VMM/VMReq.cpp
r19299 r19300 61 61 * 62 62 * @param pVM The VM handle. 63 * @param enmDest Destination of the request packet (global or per VCPU). 63 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 64 * one of the following special values: 65 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 64 66 * @param ppReq Where to store the pointer to the request. 65 67 * This will be NULL or a valid request pointer not matter what happends. … … 72 74 * @param ... Function arguments. 73 75 */ 74 VMMR3DECL(int) VMR3ReqCall(PVM pVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)76 VMMR3DECL(int) VMR3ReqCall(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...) 75 77 { 76 78 va_list va; 77 79 va_start(va, cArgs); 78 int rc = VMR3ReqCallVU(pVM->pUVM, enmDest, ppReq, cMillies, VMREQFLAGS_VBOX_STATUS, pfnFunction, cArgs, va);80 int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, ppReq, cMillies, VMREQFLAGS_VBOX_STATUS, pfnFunction, cArgs, va); 79 81 va_end(va); 80 82 return rc; … … 95 97 * 96 98 * @param pUVM Pointer to the user mode VM structure. 97 * @param enmDest Destination of the request packet (global or per VCPU). 99 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 100 * one of the following special values: 101 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 98 102 * @param ppReq Where to store the pointer to the request. 99 103 * This will be NULL or a valid request pointer not matter what happends. … … 106 110 * @param ... Function arguments. 107 111 */ 108 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)112 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...) 109 113 { 110 114 va_list va; 111 115 va_start(va, cArgs); 112 int rc = VMR3ReqCallVU(pUVM, enmDest, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);116 int rc = VMR3ReqCallVU(pUVM, idDstCpu, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va); 113 117 va_end(va); 114 118 return rc; … … 129 133 * 130 134 * @param pVM The VM handle. 131 * @param enmDest Destination of the request packet (global or per VCPU). 135 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 136 * one of the following special values: 137 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 132 138 * @param ppReq Where to store the pointer to the request. 133 139 * This will be NULL or a valid request pointer not matter what happends. … … 140 146 * @param ... Function arguments. 141 147 */ 142 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)148 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...) 143 149 { 144 150 va_list va; 145 151 va_start(va, cArgs); 146 int rc = VMR3ReqCallVU(pVM->pUVM, enmDest, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);152 int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va); 147 153 va_end(va); 148 154 return rc; … … 163 169 * 164 170 * @param pVM The VM handle. 165 * @param enmDest Destination of the request packet (global or per VCPU). 171 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 172 * one of the following special values: 173 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 166 174 * @param ppReq Where to store the pointer to the request. 167 175 * This will be NULL or a valid request pointer not matter what happends, unless fFlags … … 176 184 * @param ... Function arguments. 177 185 */ 178 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)186 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...) 179 187 { 180 188 va_list va; 181 189 va_start(va, cArgs); 182 int rc = VMR3ReqCallVU(pVM->pUVM, enmDest, ppReq, cMillies, fFlags, pfnFunction, cArgs, va);190 int rc = VMR3ReqCallVU(pVM->pUVM, idDstCpu, ppReq, cMillies, fFlags, pfnFunction, cArgs, va); 183 191 va_end(va); 184 192 return rc; … … 199 207 * 200 208 * @param pUVM Pointer to the user mode VM structure. 201 * @param enmDest Destination of the request packet (global or per VCPU). 209 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 210 * one of the following special values: 211 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 202 212 * @param ppReq Where to store the pointer to the request. 203 213 * This will be NULL or a valid request pointer not matter what happends, unless fFlags … … 212 222 * @param ... Function arguments. 213 223 */ 214 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)224 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...) 215 225 { 216 226 va_list va; 217 227 va_start(va, cArgs); 218 int rc = VMR3ReqCallVU(pUVM, enmDest, ppReq, cMillies, fFlags, pfnFunction, cArgs, va);228 int rc = VMR3ReqCallVU(pUVM, idDstCpu, ppReq, cMillies, fFlags, pfnFunction, cArgs, va); 219 229 va_end(va); 220 230 return rc; … … 235 245 * 236 246 * @param pUVM Pointer to the user mode VM structure. 237 * @param enmDest Destination of the request packet (global or per VCPU). 247 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 248 * one of the following special values: 249 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 238 250 * @param ppReq Where to store the pointer to the request. 239 251 * This will be NULL or a valid request pointer not matter what happends, unless fFlags … … 248 260 * @param Args Argument vector. 249 261 */ 250 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VM REQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)262 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args) 251 263 { 252 264 LogFlow(("VMR3ReqCallV: cMillies=%d fFlags=%#x pfnFunction=%p cArgs=%d\n", cMillies, fFlags, pfnFunction, cArgs)); … … 271 283 * Allocate request 272 284 */ 273 int rc = VMR3ReqAllocU(pUVM, &pReq, VMREQTYPE_INTERNAL, enmDest);285 int rc = VMR3ReqAllocU(pUVM, &pReq, VMREQTYPE_INTERNAL, idDstCpu); 274 286 if (RT_FAILURE(rc)) 275 287 return rc; … … 370 382 * @param ppReq Where to store the pointer to the allocated packet. 371 383 * @param enmType Package type. 372 * @param enmDest Destination of the request packet (global or per VCPU). 373 */ 374 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest) 375 { 376 return VMR3ReqAllocU(pVM->pUVM, ppReq, enmType, enmDest); 384 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 385 * one of the following special values: 386 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 387 */ 388 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu) 389 { 390 return VMR3ReqAllocU(pVM->pUVM, ppReq, enmType, idDstCpu); 377 391 } 378 392 … … 389 403 * @param ppReq Where to store the pointer to the allocated packet. 390 404 * @param enmType Package type. 391 * @param enmDest Destination of the request packet (global or per VCPU). 392 */ 393 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest) 405 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 406 * one of the following special values: 407 * VMCPUID_ANY, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 408 */ 409 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu) 394 410 { 395 411 /* … … 401 417 VERR_VM_REQUEST_INVALID_TYPE); 402 418 AssertPtrReturn(ppReq, VERR_INVALID_POINTER); 403 AssertMsgReturn( enmDest == VMREQDEST_ANY404 || enmDest == VMREQDEST_BROADCAST405 || enmDest == VMREQDEST_BROADCAST_REVERSE406 || (unsigned)enmDest < pUVM->cCpus,407 ("Invalid destination % d (max=%d)\n", enmDest, pUVM->cCpus), VERR_INVALID_PARAMETER);419 AssertMsgReturn( idDstCpu == VMCPUID_ANY 420 || idDstCpu < pUVM->cCpus 421 || idDstCpu == VMCPUID_ALL 422 || idDstCpu == VMCPUID_ALL_REVERSE, 423 ("Invalid destination %u (max=%u)\n", idDstCpu, pUVM->cCpus), VERR_INVALID_PARAMETER); 408 424 409 425 /* … … 476 492 pReq->fFlags = VMREQFLAGS_VBOX_STATUS; 477 493 pReq->enmType = enmType; 478 pReq-> enmDest = enmDest;494 pReq->idDstCpu = idDstCpu; 479 495 480 496 *ppReq = pReq; … … 513 529 pReq->fFlags = VMREQFLAGS_VBOX_STATUS; 514 530 pReq->enmType = enmType; 515 pReq-> enmDest = enmDest;531 pReq->idDstCpu = idDstCpu; 516 532 517 533 *ppReq = pReq; … … 626 642 PUVMCPU pUVCpu = (PUVMCPU)RTTlsGet(pUVM->vm.s.idxTLS); 627 643 628 if (pReq-> enmDest == VMREQDEST_BROADCAST)644 if (pReq->idDstCpu == VMCPUID_ALL) 629 645 { 630 646 /* One-by-one. */ … … 634 650 /* Reinit some members. */ 635 651 pReq->enmState = VMREQSTATE_ALLOCATED; 636 pReq-> enmDest = (VMREQDEST)i;652 pReq->idDstCpu = i; 637 653 rc = VMR3ReqQueue(pReq, cMillies); 638 654 if (RT_FAILURE(rc)) … … 640 656 } 641 657 } 642 else if (pReq-> enmDest == VMREQDEST_BROADCAST_REVERSE)658 else if (pReq->idDstCpu == VMCPUID_ALL_REVERSE) 643 659 { 644 660 /* One-by-one. */ … … 648 664 /* Reinit some members. */ 649 665 pReq->enmState = VMREQSTATE_ALLOCATED; 650 pReq-> enmDest = (VMREQDEST)i;666 pReq->idDstCpu = i; 651 667 rc = VMR3ReqQueue(pReq, cMillies); 652 668 if (RT_FAILURE(rc)) … … 654 670 } 655 671 } 656 else if ( pReq-> enmDest != VMREQDEST_ANY /* for a specific VMCPU? */657 && ( !pUVCpu /* not an EMT*/658 || pUVCpu->idCpu != (unsigned)pReq->enmDest))659 { 660 RTCPUID idTarget = (RTCPUID)pReq->enmDest; Assert(idTarget < pUVM->cCpus);672 else if ( pReq->idDstCpu != VMCPUID_ANY /* for a specific VMCPU? */ 673 && ( !pUVCpu /* and it's not the current thread. */ 674 || pUVCpu->idCpu != pReq->idDstCpu)) 675 { 676 VMCPUID idTarget = pReq->idDstCpu; Assert(idTarget < pUVM->cCpus); 661 677 PVMCPU pVCpu = &pUVM->pVM->aCpus[idTarget]; 662 678 unsigned fFlags = ((VMREQ volatile *)pReq)->fFlags; /* volatile paranoia */ … … 690 706 LogFlow(("VMR3ReqQueue: returns %Rrc\n", rc)); 691 707 } 692 else if ( pReq-> enmDest == VMREQDEST_ANY708 else if ( pReq->idDstCpu == VMCPUID_ANY 693 709 && !pUVCpu /* only EMT threads have a valid pointer stored in the TLS slot. */) 694 710 { … … 809 825 * 810 826 * @param pUVM Pointer to the user mode VM structure. 811 * @param enmDest Destination of the request packet (global or per VCPU). 812 */ 813 VMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VMREQDEST enmDest) 814 { 815 LogFlow(("VMR3ReqProcessU: (enmVMState=%d) enmDest=%d\n", pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING, enmDest)); 827 * @param idDstCpu Pass VMCPUID_ANY to process the common request queue 828 * and the CPU ID for a CPU specific one. In the latter 829 * case the calling thread must be the EMT of that CPU. 830 */ 831 VMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu) 832 { 833 LogFlow(("VMR3ReqProcessU: (enmVMState=%d) idDstCpu=%d\n", pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING, idDstCpu)); 816 834 817 835 /* … … 827 845 * Get pending requests. 828 846 */ 829 void * volatile *ppReqs;830 if ( enmDest == VMREQDEST_ANY)847 void * volatile *ppReqs; 848 if (idDstCpu == VMCPUID_ANY) 831 849 { 832 850 ppReqs = (void * volatile *)&pUVM->vm.s.pReqs; … … 836 854 else 837 855 { 838 ppReqs = (void * volatile *)&pUVM->aCpus[enmDest].vm.s.pReqs; 856 Assert(idDstCpu < pUVM->cCpus); 857 Assert(pUVM->aCpus[idDstCpu].vm.s.NativeThreadEMT == RTThreadNativeSelf()); 858 ppReqs = (void * volatile *)&pUVM->aCpus[idDstCpu].vm.s.pReqs; 839 859 if (RT_LIKELY(pUVM->pVM)) 840 VMCPU_FF_CLEAR(&pUVM->pVM->aCpus[ enmDest], VMCPU_FF_REQUEST);860 VMCPU_FF_CLEAR(&pUVM->pVM->aCpus[idDstCpu], VMCPU_FF_REQUEST); 841 861 } 842 843 862 PVMREQ pReqs = (PVMREQ)ASMAtomicXchgPtr(ppReqs, NULL); 844 863 if (!pReqs) -
trunk/src/VBox/VMM/testcase/tstAnimate.cpp
r14831 r19300 836 836 PVMREQ pReq1 = NULL; 837 837 if (FileRawMem != NIL_RTFILE) 838 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)loadMem, 3, pVM, FileRawMem, &offRawMem);838 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)loadMem, 3, pVM, FileRawMem, &offRawMem); 839 839 else 840 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)SSMR3Load, 4, pVM, pszSavedState, SSMAFTER_DEBUG_IT, NULL, NULL);840 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)SSMR3Load, 4, pVM, pszSavedState, SSMAFTER_DEBUG_IT, NULL, NULL); 841 841 AssertReleaseRC(rc); 842 842 rc = pReq1->iStatus; … … 849 849 if (FileScript != NIL_RTFILE) 850 850 { 851 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)scriptRun, 2, pVM, FileScript);851 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)scriptRun, 2, pVM, FileScript); 852 852 AssertReleaseRC(rc); 853 853 rc = pReq1->iStatus; … … 877 877 if (RT_SUCCESS(rc)) 878 878 { 879 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)EMR3RawSetMode, 2, pVM, EMRAW_NONE);879 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)EMR3RawSetMode, 2, pVM, EMRAW_NONE); 880 880 AssertReleaseRC(rc); 881 881 VMR3ReqFree(pReq1); -
trunk/src/VBox/VMM/testcase/tstMicro.cpp
r18927 r19300 354 354 */ 355 355 PVMREQ pReq1 = NULL; 356 rc = VMR3ReqCallVoid(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)doit, 1, pVM);356 rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)doit, 1, pVM); 357 357 AssertRC(rc); 358 358 VMR3ReqFree(pReq1); -
trunk/src/VBox/VMM/testcase/tstVMM-2.cpp
r14831 r19300 363 363 { 364 364 PVMREQ pReq; 365 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);365 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM); 366 366 if (RT_SUCCESS(rc)) 367 367 { … … 378 378 * Power Off the VM. 379 379 */ 380 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);380 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM); 381 381 if (RT_SUCCESS(rc)) 382 382 { -
trunk/src/VBox/VMM/testcase/tstVMM-HwAccm.cpp
r14831 r19300 94 94 RTPrintf(TESTCASE ": Testing...\n"); 95 95 PVMREQ pReq1 = NULL; 96 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoHwAccmTest, 1, pVM);96 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoHwAccmTest, 1, pVM); 97 97 AssertRC(rc); 98 98 VMR3ReqFree(pReq1); -
trunk/src/VBox/VMM/testcase/tstVMM.cpp
r17364 r19300 76 76 RTPrintf(TESTCASE ": Testing...\n"); 77 77 PVMREQ pReq1 = NULL; 78 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM);78 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM); 79 79 AssertRC(rc); 80 80 VMR3ReqFree(pReq1); -
trunk/src/VBox/VMM/testcase/tstVMMFork.cpp
r14831 r19300 137 137 RTPrintf(TESTCASE ": testing VM after fork.\n"); 138 138 PVMREQ pReq1 = NULL; 139 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM);139 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM); 140 140 AssertRC(rc); 141 141 VMR3ReqFree(pReq1); -
trunk/src/VBox/VMM/testcase/tstVMREQ.cpp
r18645 r19300 135 135 136 136 PVMREQ pReq; 137 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5,137 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5, 138 138 pVM, _4K, _1G, pszFormat, pvVA); 139 139 if (RT_SUCCESS(rc)) … … 157 157 va_start(va1, pszFormat); 158 158 PVMREQ pReq; 159 int rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5,159 int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5, 160 160 pVM, _4K, _1G, pszFormat, &va1); 161 161 if (RT_SUCCESS(rc)) … … 186 186 for (iReq = 0; iReq < cReqs; iReq++) 187 187 { 188 rc = VMR3ReqAlloc(pVM, &apReq[iReq], VMREQTYPE_INTERNAL, VM REQDEST_ANY);188 rc = VMR3ReqAlloc(pVM, &apReq[iReq], VMREQTYPE_INTERNAL, VMCPUID_ANY); 189 189 if (RT_FAILURE(rc)) 190 190 { -
trunk/src/recompiler/VBoxREMWrapper.cpp
r19293 r19300 933 933 { 934 934 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 935 { REMPARMDESC_FLAGS_INT, sizeof(VM REQDEST), NULL },935 { REMPARMDESC_FLAGS_INT, sizeof(VMCPUID), NULL }, 936 936 { REMPARMDESC_FLAGS_INT, sizeof(PVMREQ *), NULL }, 937 937 { REMPARMDESC_FLAGS_INT, sizeof(unsigned), NULL }, -
trunk/src/recompiler/VBoxRecompiler.c
r19293 r19300 3541 3541 return remR3DisasEnableStepping(pVM, fEnable); 3542 3542 3543 rc = VMR3ReqCall(pVM, VM REQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)remR3DisasEnableStepping, 2, pVM, fEnable);3543 rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)remR3DisasEnableStepping, 2, pVM, fEnable); 3544 3544 AssertRC(rc); 3545 3545 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.