Changeset 13755
- Timestamp:
- 11/03/08 16:49:06 (2 months ago)
- Files:
-
- trunk/include/VBox/uvm.h (modified) (1 diff)
- trunk/include/VBox/vmapi.h (modified) (3 diffs)
- trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp (modified) (1 diff)
- trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp (modified) (2 diffs)
- trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp (modified) (2 diffs)
- trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp (modified) (4 diffs)
- trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp (modified) (5 diffs)
- trunk/src/VBox/Main/ConsoleImpl.cpp (modified) (4 diffs)
- trunk/src/VBox/Main/DisplayImpl.cpp (modified) (6 diffs)
- trunk/src/VBox/Main/MachineDebuggerImpl.cpp (modified) (2 diffs)
- trunk/src/VBox/VMM/DBGF.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/DBGFBp.cpp (modified) (7 diffs)
- trunk/src/VBox/VMM/DBGFInfo.cpp (modified) (4 diffs)
- trunk/src/VBox/VMM/DBGFLog.cpp (modified) (3 diffs)
- trunk/src/VBox/VMM/DBGFMem.cpp (modified) (3 diffs)
- trunk/src/VBox/VMM/DBGFOS.cpp (modified) (4 diffs)
- trunk/src/VBox/VMM/DBGFStack.cpp (modified) (2 diffs)
- trunk/src/VBox/VMM/PATM/CSAM.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/PGMPhys.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/PGMPool.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/VM.cpp (modified) (15 diffs)
- trunk/src/VBox/VMM/VMInternal.h (modified) (1 diff)
- trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/VMMAll/VMAll.cpp (modified) (2 diffs)
- trunk/src/VBox/VMM/VMReq.cpp (modified) (17 diffs)
- trunk/src/VBox/VMM/testcase/tstAnimate.cpp (modified) (3 diffs)
- trunk/src/VBox/VMM/testcase/tstMicro.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/testcase/tstVMM-2.cpp (modified) (2 diffs)
- trunk/src/VBox/VMM/testcase/tstVMM-HwAccm.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/testcase/tstVMM.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/testcase/tstVMREQ.cpp (modified) (3 diffs)
- trunk/src/recompiler/VBoxREMWrapper.cpp (modified) (1 diff)
- trunk/src/recompiler/VBoxRecompiler.c (modified) (1 diff)
- trunk/src/recompiler_new/VBoxREMWrapper.cpp (modified) (1 diff)
- trunk/src/recompiler_new/VBoxRecompiler.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/VBox/uvm.h
r13751 r13755 42 42 { 43 43 uint32_t uFiller; 44 /** The VM internal data. */ 45 struct 46 { 47 #ifdef ___VMInternal_h 48 struct VMINTUSERPERVMCPU s; 49 #endif 50 uint8_t padding[768]; 51 } vm; 44 52 } UVMCPU; 45 53 trunk/include/VBox/vmapi.h
r13742 r13755 263 263 VMREQFLAGS_NO_WAIT = 2 264 264 } VMREQFLAGS; 265 266 /** 267 * Request destination 268 */ 269 typedef enum VMREQDEST 270 { 271 /** Request packet for VCPU 0. */ 272 VMREQDEST_CPU0 = 0, 273 274 /** Request packet for the VM (any VCPU can handle it). */ 275 VMREQDEST_ALL = -1 276 } VMREQDEST; 265 277 266 278 /** … … 292 304 /** Request type. */ 293 305 VMREQTYPE enmType; 306 /** Request destination. */ 307 VMREQDEST enmDest; 294 308 /** Request specific data. */ 295 309 union VMREQ_U … … 399 413 VMMR3DECL(int) VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser); 400 414 VMMR3DECL(void) VMR3SetRuntimeErrorWorker(PVM pVM); 401 VMMR3DECL(int) VMR3ReqCall(PVM pVM, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);402 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);403 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);404 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);405 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);406 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);407 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType );408 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType );415 VMMR3DECL(int) VMR3ReqCall(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 416 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 417 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 418 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 419 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 420 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args); 421 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest); 422 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest); 409 423 VMMR3DECL(int) VMR3ReqFree(PVMREQ pReq); 410 424 VMMR3DECL(int) VMR3ReqQueue(PVMREQ pReq, unsigned cMillies); trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r11307 r13755 378 378 /* pdm.h says that this has to be called from the EMT thread */ 379 379 PVMREQ pReq; 380 int rcVBox = VMR3ReqCallVoid(pVM, &pReq, RT_INDEFINITE_WAIT,380 int rcVBox = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 381 381 (PFNRT)VMDisplay::doInvalidateAndUpdate, 1, mpDrv); 382 382 if (VBOX_SUCCESS(rcVBox)) trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp
r11322 r13755 244 244 LogFlowMember (("Console::AttachUSBDevice: Proxying USB device '%s' %Vuuid...\n", Address.c_str(), &Uuid)); 245 245 PVMREQ pReq; 246 vrc = VMR3ReqCall (mpVM, &pReq, RT_INDEFINITE_WAIT,246 vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 247 247 (PFNRT)pRhConfig->pfnCreateProxyDevice, 248 248 5, pRhConfig, &Uuid, fRemote, … … 303 303 LogFlowMember (("Console::DetachUSBDevice: Detaching USB proxy device %Vuuid...\n", &Uuid)); 304 304 PVMREQ pReq; 305 vrc = VMR3ReqCall (mpVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)pRhConfig->pfnDestroyProxyDevice,305 vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)pRhConfig->pfnDestroyProxyDevice, 306 306 2, pRhConfig, &Uuid); 307 307 if (VBOX_SUCCESS (vrc)) trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp
r8155 r13755 138 138 PVMREQ pReq; 139 139 EMRAWMODE rawModeFlag = enable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE; 140 int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,140 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 141 141 (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag); 142 142 if (VBOX_SUCCESS(rcVBox)) … … 198 198 PVMREQ pReq; 199 199 EMRAWMODE rawModeFlag = enable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE; 200 int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,200 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 201 201 (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag); 202 202 if (VBOX_SUCCESS(rcVBox)) trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r13742 r13755 965 965 /* Power off VM */ 966 966 PVMREQ pReq; 967 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);967 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM); 968 968 } 969 969 … … 1274 1274 { 1275 1275 startProgressInfo("Restoring"); 1276 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,1276 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1277 1277 (PFNRT)VMR3Load, 4, pVM, g_pszStateFile, &callProgressInfo, NULL); 1278 1278 endProgressInfo(); … … 1280 1280 { 1281 1281 VMR3ReqFree(pReq); 1282 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,1282 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1283 1283 (PFNRT)VMR3Resume, 1, pVM); 1284 1284 if (VBOX_SUCCESS(rc)) … … 1294 1294 else 1295 1295 { 1296 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);1296 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM); 1297 1297 if (VBOX_SUCCESS(rc)) 1298 1298 { trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp
r8155 r13755 63 63 64 64 PVMREQ pReq; 65 int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,65 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT,86 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT,104 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 105 105 (PFNRT)VMR3Reset, 1, pVM); 106 106 AssertRC(rcVBox); … … 160 160 161 161 startProgressInfo("Saving"); 162 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,162 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 163 163 (PFNRT)VMR3Save, 4, pVM, g_pszStateFile, &callProgressInfo, NULL); 164 164 endProgressInfo(); … … 193 193 { 194 194 PVMREQ pReq; 195 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,195 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 196 196 (PFNRT)VMR3Suspend, 1, pVM); 197 197 AssertRC(rc); trunk/src/VBox/Main/ConsoleImpl.cpp
r13742 r13755 2710 2710 */ 2711 2711 PVMREQ pReq; 2712 int vrc = VMR3ReqCall (mpVM, &pReq, 0 /* no wait! */,2712 int vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, 0 /* no wait! */, 2713 2713 (PFNRT) Console::changeDrive, 8, 2714 2714 this, pszDevice, uInstance, uLun, eState, peState, … … 5527 5527 /** @todo just do everything here and only wrap the PDMR3Usb call. That'll offload some notification stuff from the EMT thread. */ 5528 5528 PVMREQ pReq = NULL; 5529 int vrc = VMR3ReqCall (mpVM, &pReq, RT_INDEFINITE_WAIT,5529 int vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 5530 5530 (PFNRT) usbAttachCallback, 6, this, aHostDevice, Uuid.ptr(), fRemote, Address.raw(), aMaskedIfs); 5531 5531 if (VBOX_SUCCESS (vrc)) … … 5652 5652 PVMREQ pReq; 5653 5653 /** @todo just do everything here and only wrap the PDMR3Usb call. That'll offload some notification stuff from the EMT thread. */ 5654 int vrc = VMR3ReqCall (mpVM, &pReq, RT_INDEFINITE_WAIT,5654 int vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 5655 5655 (PFNRT) usbDetachCallback, 4, 5656 5656 this, &aIt, (*aIt)->id().raw()); … … 7136 7136 * to access Console. 7137 7137 */ 7138 int vrc = VMR3ReqCall (that->mpVM, &pReq, RT_INDEFINITE_WAIT,7138 int vrc = VMR3ReqCall (that->mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 7139 7139 (PFNRT)reconfigureHardDisks, 3, that->mpVM, 7140 7140 atts [i], &rc); trunk/src/VBox/Main/DisplayImpl.cpp
r13607 r13755 1348 1348 /* send request to the EMT thread */ 1349 1349 PVMREQ pReq = NULL; 1350 int vrc = VMR3ReqCall (pVM, &pReq, RT_INDEFINITE_WAIT,1350 int vrc = VMR3ReqCall (pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1351 1351 (PFNRT) changeFramebuffer, 4, 1352 1352 this, static_cast <IFramebuffer *> (frameBuf), … … 1435 1435 /* send request to the EMT thread */ 1436 1436 PVMREQ pReq = NULL; 1437 int vrc = VMR3ReqCall (pVM, &pReq, RT_INDEFINITE_WAIT,1437 int vrc = VMR3ReqCall (pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1438 1438 (PFNRT) changeFramebuffer, 4, 1439 1439 this, frameBuf, false /* aInternal */, VBOX_VIDEO_PRIMARY_SCREEN); … … 1476 1476 /* send request to the EMT thread */ 1477 1477 PVMREQ pReq = NULL; 1478 int vrc = VMR3ReqCall (pVM, &pReq, RT_INDEFINITE_WAIT,1478 int vrc = VMR3ReqCall (pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1479 1479 (PFNRT) changeFramebuffer, 4, 1480 1480 this, aFramebuffer, false /* aInternal */, aScreenId); … … 1631 1631 PVMREQ pReq; 1632 1632 size_t cbData = RT_ALIGN_Z(width, 4) * 4 * height; 1633 rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,1633 rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1634 1634 (PFNRT)mpDrv->pUpPort->pfnSnapshot, 6, mpDrv->pUpPort, 1635 1635 address, cbData, NULL, NULL, NULL); … … 1692 1692 */ 1693 1693 PVMREQ pReq; 1694 int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,1694 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1695 1695 (PFNRT)mpDrv->pUpPort->pfnDisplayBlt, 6, mpDrv->pUpPort, 1696 1696 address, x, y, width, height); … … 1752 1752 /* pdm.h says that this has to be called from the EMT thread */ 1753 1753 PVMREQ pReq; 1754 int rcVBox = VMR3ReqCallVoid(pVM, &pReq, RT_INDEFINITE_WAIT,1754 int rcVBox = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 1755 1755 (PFNRT)mpDrv->pUpPort->pfnUpdateDisplayAll, 1, mpDrv->pUpPort); 1756 1756 if (VBOX_SUCCESS(rcVBox)) trunk/src/VBox/Main/MachineDebuggerImpl.cpp
r13221 r13755 244 244 PVMREQ pReq; 245 245 EMRAWMODE rawModeFlag = enable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE; 246 int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,246 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 247 247 (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 248 248 if (VBOX_SUCCESS(rcVBox)) … … 313 313 PVMREQ pReq; 314 314 EMRAWMODE rawModeFlag = enable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE; 315 int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT,315 int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 316 316 (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 317 317 if (VBOX_SUCCESS(rcVBox)) trunk/src/VBox/VMM/DBGF.cpp
r13532 r13755 823 823 */ 824 824 PVMREQ pReq; 825 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3Attach, 1, pVM);825 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3Attach, 1, pVM); 826 826 if (RT_SUCCESS(rc)) 827 827 rc = pReq->iStatus; trunk/src/VBox/VMM/DBGFBp.cpp
r12989 r13755 288 288 */ 289 289 PVMREQ pReq; 290 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetInt3, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);290 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetInt3, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp); 291 291 if (VBOX_SUCCESS(rc)) 292 292 rc = pReq->iStatus; … … 437 437 */ 438 438 PVMREQ pReq; 439 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetReg, 7, pVM, pAddress, &iHitTrigger, &iHitDisable, fType, cb, piBp);439 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetReg, 7, pVM, pAddress, &iHitTrigger, &iHitDisable, fType, cb, piBp); 440 440 if (VBOX_SUCCESS(rc)) 441 441 rc = pReq->iStatus; … … 602 602 */ 603 603 PVMREQ pReq; 604 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetREM, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp);604 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpSetREM, 5, pVM, pAddress, &iHitTrigger, &iHitDisable, piBp); 605 605 if (VBOX_SUCCESS(rc)) 606 606 rc = pReq->iStatus; … … 698 698 */ 699 699 PVMREQ pReq; 700 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpClear, 2, pVM, iBp);700 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpClear, 2, pVM, iBp); 701 701 if (VBOX_SUCCESS(rc)) 702 702 rc = pReq->iStatus; … … 775 775 */ 776 776 PVMREQ pReq; 777 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnable, 2, pVM, iBp);777 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnable, 2, pVM, iBp); 778 778 if (VBOX_SUCCESS(rc)) 779 779 rc = pReq->iStatus; … … 852 852 */ 853 853 PVMREQ pReq; 854 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpDisable, 2, pVM, iBp);854 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpDisable, 2, pVM, iBp); 855 855 if (VBOX_SUCCESS(rc)) 856 856 rc = pReq->iStatus; … … 928 928 */ 929 929 PVMREQ pReq; 930 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnum, 3, pVM, pfnCallback, pvUser);930 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3BpEnum, 3, pVM, pfnCallback, pvUser); 931 931 if (VBOX_SUCCESS(rc)) 932 932 rc = pReq->iStatus; trunk/src/VBox/VMM/DBGFInfo.cpp
r12989 r13755 717 717 case DBGFINFOTYPE_DEV: 718 718 if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT) 719 rc = VMR3ReqCallVoid(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Dev.pfnHandler, 3, Info.u.Dev.pDevIns, pHlp, pszArgs);719 rc = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Drv.pfnHandler, 3, Info.u.Drv.pDrvIns, pHlp, pszArgs);726 rc = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Int.pfnHandler, 3, pVM, pHlp, pszArgs);733 rc = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT, (PFNRT)Info.u.Ext.pfnHandler, 3, Info.u.Ext.pvUser, pHlp, pszArgs);740 rc = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &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
r12989 r13755 53 53 54 54 PVMREQ pReq; 55 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyGroups, 2, pVM, pszGroupSettings);55 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyGroups, 2, pVM, pszGroupSettings); 56 56 if (VBOX_SUCCESS(rc)) 57 57 rc = pReq->iStatus; … … 90 90 91 91 PVMREQ pReq; 92 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyFlags, 2, pVM, pszFlagSettings);92 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyFlags, 2, pVM, pszFlagSettings); 93 93 if (VBOX_SUCCESS(rc)) 94 94 rc = pReq->iStatus; … … 127 127 128 128 PVMREQ pReq; 129 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyDestinations, 2, pVM, pszDestSettings);129 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3LogModifyDestinations, 2, pVM, pszDestSettings); 130 130 if (VBOX_SUCCESS(rc)) 131 131 rc = pReq->iStatus; trunk/src/VBox/VMM/DBGFMem.cpp
r13685 r13755 113 113 { 114 114 PVMREQ pReq; 115 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3MemScan, 6,115 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3MemScan, 6, 116 116 pVM, pAddress, cbRange, pabNeedle, cbNeedle, pHitAddress); 117 117 if (VBOX_SUCCESS(rc)) … … 180 180 { 181 181 PVMREQ pReq; 182 int rc = VMR3ReqCallU(pVM->pUVM, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3MemRead, 4,182 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3MemRead, 4, 183 183 pVM, pAddress, pvBuf, cbRead); 184 184 if (VBOX_SUCCESS(rc)) … … 277 277 */ 278 278 PVMREQ pReq; 279 int rc = VMR3ReqCallU(pVM->pUVM, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3MemReadString, 4,279 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3MemReadString, 4, 280 280 pVM, pAddress, pszBuf, cchBuf); 281 281 if (VBOX_SUCCESS(rc)) trunk/src/VBox/VMM/DBGFOS.cpp
r12989 r13755 115 115 */ 116 116 PVMREQ pReq; 117 int rc = VMR3ReqCallU(pVM->pUVM, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSRegister, 2, pVM, pReg);117 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSDetect, 3, pVM, pszName, cchName);225 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSQueryNameAndVersion,309 int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ALL, &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, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf);360 VMR3ReqCallVoidU(pVM->pUVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3OSQueryInterface, 3, pVM, enmIf, &pvIf); 361 361 VMR3ReqFree(pReq); 362 362 trunk/src/VBox/VMM/DBGFStack.cpp
r12989 r13755 357 357 358 358 PVMREQ pReq; 359 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3StackWalkCtxFull, 4,359 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3StackWalkCtxFull, 4, 360 360 pVM, pFrame, CPUMGetGuestCtxCore(pVM), true); 361 361 if (VBOX_SUCCESS(rc)) … … 388 388 389 389 PVMREQ pReq; 390 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3StackWalkCtxFull, 4,390 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3StackWalkCtxFull, 4, 391 391 pVM, pFrame, CPUMGetHyperCtxCore(pVM), 4); 392 392 if (VBOX_SUCCESS(rc)) trunk/src/VBox/VMM/PATM/CSAM.cpp
r13532 r13755 1955 1955 Log(("CSAMCodePageWriteHandler: delayed write!\n")); 1956 1956 AssertCompileSize(RTRCPTR, 4); 1957 rc = VMR3ReqCallEx(pVM, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,1957 rc = VMR3ReqCallEx(pVM, VMREQDEST_ALL, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, 1958 1958 (PFNRT)CSAMDelayedWriteHandler, 3, pVM, (RTRCPTR)GCPtr, cbBuf); 1959 1959 } trunk/src/VBox/VMM/PGMPhys.cpp
r13371 r13755 1975 1975 AssertMsg(!PDMCritSectIsOwner(&pVM->pgm.s.CritSect), ("We own the PGM lock -> deadlock danger!!\n")); 1976 1976 1977 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PGM3PhysGrowRange, 2, pVM, &GCPhysParam);1977 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PGM3PhysGrowRange, 2, pVM, &GCPhysParam); 1978 1978 if (VBOX_SUCCESS(rc)) 1979 1979 { trunk/src/VBox/VMM/PGMPool.cpp
r13543 r13755 546 546 if (!pPage->fReusedFlushPending) 547 547 { 548 int rc = VMR3ReqCallEx(pPool->pVMR3, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, (PFNRT)pgmR3PoolFlushReusedPage, 2, pPool, pPage);548 int rc = VMR3ReqCallEx(pPool->pVMR3, VMREQDEST_ALL, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, (PFNRT)pgmR3PoolFlushReusedPage, 2, pPool, pPage); 549 549 AssertRCReturn(rc, rc); 550 550 pPage->fReusedFlushPending = true; trunk/src/VBox/VMM/VM.cpp
r13751 r13755 229 229 */ 230 230 PVMREQ pReq; 231 rc = VMR3ReqCallU(pUVM, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3CreateU,231 rc = VMR3ReqCallU(pUVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3CreateU, 232 232 4, pUVM, cCPUs, pfnCFGMConstructor, pvUserCFGM); 233 233 if (RT_SUCCESS(rc)) … … 903 903 */ 904 904 PVMREQ pReq; 905 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOn, 1, pVM);905 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOn, 1, pVM); 906 906 if (VBOX_SUCCESS(rc)) 907 907 { … … 973 973 */ 974 974 PVMREQ pReq; 975 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Suspend, 1, pVM);975 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Suspend, 1, pVM); 976 976 if (VBOX_SUCCESS(rc)) 977 977 { … … 1060 1060 */ 1061 1061 PVMREQ pReq; 1062 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Resume, 1, pVM);1062 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Resume, 1, pVM); 1063 1063 if (VBOX_SUCCESS(rc)) 1064 1064 { … … 1141 1141 */ 1142 1142 PVMREQ pReq; 1143 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Save, 4, pVM, pszFilename, pfnProgress, pvUser);1143 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Save, 4, pVM, pszFilename, pfnProgress, pvUser); 1144 1144 if (VBOX_SUCCESS(rc)) 1145 1145 { … … 1236 1236 */ 1237 1237 PVMREQ pReq; 1238 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Load, 4, pVM, pszFilename, pfnProgress, pvUser);1238 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Load, 4, pVM, pszFilename, pfnProgress, pvUser); 1239 1239 if (VBOX_SUCCESS(rc)) 1240 1240 { … … 1325 1325 */ 1326 1326 PVMREQ pReq; 1327 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOff, 1, pVM);1327 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOff, 1, pVM); 1328 1328 if (VBOX_SUCCESS(rc)) 1329 1329 { … … 1495 1495 */ 1496 1496 PVMREQ pReq = NULL; 1497 int rc = VMR3ReqCallU(pUVM, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3Destroy, 1, pVM);1497 int rc = VMR3ReqCallU(pUVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3Destroy, 1, pVM); 1498 1498 if (RT_SUCCESS(rc)) 1499 1499 rc = pReq->iStatus; … … 1881 1881 */ 1882 1882 PVMREQ pReq = NULL; 1883 rc = VMR3ReqCall(pVM, &pReq, 0, (PFNRT)vmR3Reset, 1, pVM);1883 rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, 0, (PFNRT)vmR3Reset, 1, pVM); 1884 1884 while (rc == VERR_TIMEOUT) 1885 1885 rc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); … … 2399 2399 */ 2400 2400 PVMREQ pReq; 2401 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateRegisterU, 3, pVM->pUVM, pfnAtState, pvUser);2401 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateRegisterU, 3, pVM->pUVM, pfnAtState, pvUser); 2402 2402 if (VBOX_FAILURE(rc)) 2403 2403 return rc; … … 2468 2468 */ 2469 2469 PVMREQ pReq; 2470 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateDeregisterU, 3, pVM->pUVM, pfnAtState, pvUser);2470 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtStateDeregisterU, 3, pVM->pUVM, pfnAtState, pvUser); 2471 2471 if (VBOX_FAILURE(rc)) 2472 2472 return rc; … … 2570 2570 */ 2571 2571 PVMREQ pReq; 2572 int rc = VMR3ReqCallU(pUVM, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3AtErrorRegisterU, 3, pUVM, pfnAtError, pvUser);2572 int rc = VMR3ReqCallU(pUVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)vmR3AtErrorRegisterU, 3, pUVM, pfnAtError, pvUser); 2573 2573 if (VBOX_FAILURE(rc)) 2574 2574 return rc; … … 2639 2639 */ 2640 2640 PVMREQ pReq; 2641 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtErrorDeregisterU, 3, pVM->pUVM, pfnAtError, pvUser);2641 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtErrorDeregisterU, 3, pVM->pUVM, pfnAtError, pvUser); 2642 2642 if (VBOX_FAILURE(rc)) 2643 2643 return rc; … … 2855 2855 */ 2856 2856 PVMREQ pReq; 2857 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorRegisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser);2857 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorRegisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser); 2858 2858 if (VBOX_FAILURE(rc)) 2859 2859 return rc; … … 2924 2924 */ 2925 2925 PVMREQ pReq; 2926 int rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorDeregisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser);2926 int rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3AtRuntimeErrorDeregisterU, 3, pVM->pUVM, pfnAtRuntimeError, pvUser); 2927 2927 if (VBOX_FAILURE(rc)) 2928 2928 return rc; trunk/src/VBox/VMM/VMInternal.h
r13667 r13755 413 413 414 414 415 /** 416 * VMCPU internal data kept in the UVM. 417 * 418 * Almost a copy of VMINTUSERPERVM. Separate data properly later on. 419 */ 420 typedef struct VMINTUSERPERVMCPU 421 { 422 /** Head of the request queue. Atomic. */ 423 volatile PVMREQ pReqs; 424 425 /** The handle to the EMT thread. */ 426 RTTHREAD ThreadEMT; 427 /** The native of the EMT thread. */ 428 RTNATIVETHREAD NativeThreadEMT; 429 /** Wait event semaphore. */ 430 RTSEMEVENT EventSemWait; 431 /** Wait/Idle indicator. */ 432 bool volatile fWait; 433 /** Force EMT to terminate. */ 434 bool volatile fTerminateEMT; 435 /** If set the EMT does the final VM cleanup when it exits. 436 * If clear the VMR3Destroy() caller does so. */ 437 bool fEMTDoesTheCleanup; 438 439 /** @name Generic Halt data 440 * @{ 441 */ 442 /** The current halt method. 443 * Can be selected by CFGM option 'VM/HaltMethod'. */ 444 VMHALTMETHOD enmHaltMethod; 445 /** The index into g_aHaltMethods of the current halt method. */ 446 uint32_t volatile iHaltMethod; 447 /** The average time (ns) between two halts in the last second. (updated once per second) */ 448 uint32_t HaltInterval; 449 /** The average halt frequency for the last second. (updated once per second) */ 450 uint32_t HaltFrequency; 451 /** The number of halts in the current period. */ 452 uint32_t cHalts; 453 uint32_t padding; /**< alignment padding. */ 454 /** When we started counting halts in cHalts (RTTimeNanoTS). */ 455 uint64_t u64HaltsStartTS; 456 /** @} */ 457 458 /** Union containing data and config for the different halt algorithms. */ 459 union 460 { 461 /** 462 * Method 1 & 2 - Block whenever possible, and when lagging behind 463 * switch to spinning with regular blocking every 5-200ms (defaults) 464 * depending on the accumulated lag. The blocking interval is adjusted 465 * with the average oversleeping of the last 64 times. 466 * 467 * The difference between 1 and 2 is that we use native absolute 468 * time APIs for the blocking instead of the millisecond based IPRT 469 * interface. 470 */ 471 struct 472 { 473 /** How many times we've blocked while cBlockedNS and cBlockedTooLongNS has been accumulating. */ 474 uint32_t cBlocks; 475 /** Avg. time spend oversleeping when blocking. (Re-calculated every so often.) */ 476 uint64_t cNSBlockedTooLongAvg; 477 /** Total time spend oversleeping when blocking. */ 478 uint64_t cNSBlockedTooLong; 479 /** Total time spent blocking. */ 480 uint64_t cNSBlocked; 481 /** The timestamp (RTTimeNanoTS) of the last block. */ 482 uint64_t u64LastBlockTS; 483 484 /** When we started spinning relentlessly in order to catch up some of the oversleeping. 485 * This is 0 when we're not spinning. */ 486 uint64_t u64StartSpinTS; 487 488 /** The max interval without blocking (when spinning). */ 489 uint32_t u32MinBlockIntervalCfg; 490 /** The minimum interval between blocking (when spinning). */ 491 uint32_t u32MaxBlockIntervalCfg; 492 /** The value to divide the current lag by to get the raw blocking interval (when spinning). */ 493 uint32_t u32LagBlockIntervalDivisorCfg; 494 /** When to start spinning (lag / nano secs). */ 495 uint32_t u32StartSpinningCfg; 496 /** When to stop spinning (lag / nano secs). */ 497 uint32_t u32StopSpinningCfg; 498 } Method12; 499 500 #if 0 501 /** 502 * Method 3 & 4 - Same as method 1 & 2 respectivly, except that we 503 * sprinkle it with yields. 504 */ 505 struct 506 { 507 /** How many times we've blocked while cBlockedNS and cBlockedTooLongNS has been accumulating. */ 508 uint32_t cBlocks; 509 /** Avg. time spend oversleeping when blocking. (Re-calculated every so often.) */ 510 uint64_t cBlockedTooLongNSAvg; 511 /** Total time spend oversleeping when blocking. */ 512 uint64_t cBlockedTooLongNS; 513 /** Total time spent blocking. */ 514 uint64_t cBlockedNS; 515 /** The timestamp (RTTimeNanoTS) of the last block. */ 516 uint64_t u64LastBlockTS; 517 518 /** How many times we've yielded while cBlockedNS and cBlockedTooLongNS has been accumulating. */ 519 uint32_t cYields; 520 /** Avg. time spend oversleeping when yielding. */ 521 uint32_t cYieldTooLongNSAvg; 522 /** Total time spend oversleeping when yielding. */ 523 uint64_t cYieldTooLongNS; 524 /** Total time spent yielding. */

