VirtualBox

Changeset 13755

Show
Ignore:
Timestamp:
11/03/08 16:49:06 (2 months ago)
Author:
vboxsync
Message:

Started with VM request API changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/VBox/uvm.h

    r13751 r13755  
    4242{ 
    4343    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; 
    4452} UVMCPU; 
    4553 
  • trunk/include/VBox/vmapi.h

    r13742 r13755  
    263263    VMREQFLAGS_NO_WAIT      = 2 
    264264} VMREQFLAGS; 
     265 
     266/** 
     267 * Request destination 
     268 */ 
     269typedef 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; 
    265277 
    266278/** 
     
    292304    /** Request type. */ 
    293305    VMREQTYPE               enmType; 
     306    /** Request destination. */ 
     307    VMREQDEST               enmDest; 
    294308    /** Request specific data. */ 
    295309    union VMREQ_U 
     
    399413VMMR3DECL(int)  VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser); 
    400414VMMR3DECL(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); 
     415VMMR3DECL(int)  VMR3ReqCall(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 
     416VMMR3DECL(int)  VMR3ReqCallVoidU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 
     417VMMR3DECL(int)  VMR3ReqCallVoid(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 
     418VMMR3DECL(int)  VMR3ReqCallEx(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 
     419VMMR3DECL(int)  VMR3ReqCallU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 
     420VMMR3DECL(int)  VMR3ReqCallVU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args); 
     421VMMR3DECL(int)  VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest); 
     422VMMR3DECL(int)  VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest); 
    409423VMMR3DECL(int)  VMR3ReqFree(PVMREQ pReq); 
    410424VMMR3DECL(int)  VMR3ReqQueue(PVMREQ pReq, unsigned cMillies); 
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp

    r11307 r13755  
    378378    /* pdm.h says that this has to be called from the EMT thread */ 
    379379    PVMREQ pReq; 
    380     int rcVBox = VMR3ReqCallVoid(pVM, &pReq, RT_INDEFINITE_WAIT, 
     380    int rcVBox = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    381381                                 (PFNRT)VMDisplay::doInvalidateAndUpdate, 1, mpDrv); 
    382382    if (VBOX_SUCCESS(rcVBox)) 
  • trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp

    r11322 r13755  
    244244    LogFlowMember (("Console::AttachUSBDevice: Proxying USB device '%s' %Vuuid...\n", Address.c_str(), &Uuid)); 
    245245    PVMREQ pReq; 
    246     vrc = VMR3ReqCall (mpVM, &pReq, RT_INDEFINITE_WAIT, 
     246    vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    247247                       (PFNRT)pRhConfig->pfnCreateProxyDevice, 
    248248                       5, pRhConfig, &Uuid, fRemote, 
     
    303303            LogFlowMember (("Console::DetachUSBDevice: Detaching USB proxy device %Vuuid...\n", &Uuid)); 
    304304            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, 
    306306                               2, pRhConfig, &Uuid); 
    307307            if (VBOX_SUCCESS (vrc)) 
  • trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp

    r8155 r13755  
    138138    PVMREQ pReq; 
    139139    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, 
    141141                             (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag); 
    142142    if (VBOX_SUCCESS(rcVBox)) 
     
    198198    PVMREQ pReq; 
    199199    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, 
    201201                             (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag); 
    202202    if (VBOX_SUCCESS(rcVBox)) 
  • trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp

    r13742 r13755  
    965965            /* Power off VM */ 
    966966            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); 
    968968        } 
    969969 
     
    12741274        { 
    12751275            startProgressInfo("Restoring"); 
    1276             rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     1276            rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    12771277                             (PFNRT)VMR3Load, 4, pVM, g_pszStateFile, &callProgressInfo, NULL); 
    12781278            endProgressInfo(); 
     
    12801280            { 
    12811281                VMR3ReqFree(pReq); 
    1282                 rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     1282                rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    12831283                                 (PFNRT)VMR3Resume, 1, pVM); 
    12841284                if (VBOX_SUCCESS(rc)) 
     
    12941294        else 
    12951295        { 
    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); 
    12971297            if (VBOX_SUCCESS(rc)) 
    12981298            { 
  • trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp

    r8155 r13755  
    6363 
    6464    PVMREQ pReq; 
    65     int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     65    int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    6666                             (PFNRT)VMR3Suspend, 1, pVM); 
    6767    AssertRC(rcVBox); 
     
    8484 
    8585    PVMREQ pReq; 
    86     int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     86    int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    8787                             (PFNRT)VMR3Resume, 1, pVM); 
    8888    AssertRC(rcVBox); 
     
    102102{ 
    103103    PVMREQ pReq; 
    104     int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     104    int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    105105                             (PFNRT)VMR3Reset, 1, pVM); 
    106106    AssertRC(rcVBox); 
     
    160160 
    161161    startProgressInfo("Saving"); 
    162     rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     162    rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    163163                     (PFNRT)VMR3Save, 4, pVM, g_pszStateFile, &callProgressInfo, NULL); 
    164164    endProgressInfo(); 
     
    193193    { 
    194194        PVMREQ pReq; 
    195         rc = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     195        rc = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    196196                         (PFNRT)VMR3Suspend, 1, pVM); 
    197197        AssertRC(rc); 
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r13742 r13755  
    27102710     */ 
    27112711    PVMREQ pReq; 
    2712     int vrc = VMR3ReqCall (mpVM, &pReq, 0 /* no wait! */, 
     2712    int vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, 0 /* no wait! */, 
    27132713                           (PFNRT) Console::changeDrive, 8, 
    27142714                           this, pszDevice, uInstance, uLun, eState, peState, 
     
    55275527/** @todo just do everything here and only wrap the PDMR3Usb call. That'll offload some notification stuff from the EMT thread. */ 
    55285528    PVMREQ pReq = NULL; 
    5529     int vrc = VMR3ReqCall (mpVM, &pReq, RT_INDEFINITE_WAIT, 
     5529    int vrc = VMR3ReqCall (mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    55305530                           (PFNRT) usbAttachCallback, 6, this, aHostDevice, Uuid.ptr(), fRemote, Address.raw(), aMaskedIfs); 
    55315531    if (VBOX_SUCCESS (vrc)) 
     
    56525652    PVMREQ pReq; 
    56535653/** @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, 
    56555655                           (PFNRT) usbDetachCallback, 4, 
    56565656                           this, &aIt, (*aIt)->id().raw()); 
     
    71367136                 *  to access Console. 
    71377137                 */ 
    7138                 int vrc = VMR3ReqCall (that->mpVM, &pReq, RT_INDEFINITE_WAIT, 
     7138                int vrc = VMR3ReqCall (that->mpVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    71397139                                       (PFNRT)reconfigureHardDisks, 3, that->mpVM, 
    71407140                                       atts [i], &rc); 
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r13607 r13755  
    13481348        /* send request to the EMT thread */ 
    13491349        PVMREQ pReq = NULL; 
    1350         int vrc = VMR3ReqCall (pVM, &pReq, RT_INDEFINITE_WAIT, 
     1350        int vrc = VMR3ReqCall (pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    13511351                               (PFNRT) changeFramebuffer, 4, 
    13521352                               this, static_cast <IFramebuffer *> (frameBuf), 
     
    14351435        /* send request to the EMT thread */ 
    14361436        PVMREQ pReq = NULL; 
    1437         int vrc = VMR3ReqCall (pVM, &pReq, RT_INDEFINITE_WAIT, 
     1437        int vrc = VMR3ReqCall (pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    14381438                               (PFNRT) changeFramebuffer, 4, 
    14391439                               this, frameBuf, false /* aInternal */, VBOX_VIDEO_PRIMARY_SCREEN); 
     
    14761476        /* send request to the EMT thread */ 
    14771477        PVMREQ pReq = NULL; 
    1478         int vrc = VMR3ReqCall (pVM, &pReq, RT_INDEFINITE_WAIT, 
     1478        int vrc = VMR3ReqCall (pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    14791479                               (PFNRT) changeFramebuffer, 4, 
    14801480                               this, aFramebuffer, false /* aInternal */, aScreenId); 
     
    16311631        PVMREQ pReq; 
    16321632        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, 
    16341634                             (PFNRT)mpDrv->pUpPort->pfnSnapshot, 6, mpDrv->pUpPort, 
    16351635                             address, cbData, NULL, NULL, NULL); 
     
    16921692     */ 
    16931693    PVMREQ pReq; 
    1694     int rcVBox = VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, 
     1694    int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    16951695                             (PFNRT)mpDrv->pUpPort->pfnDisplayBlt, 6, mpDrv->pUpPort, 
    16961696                             address, x, y, width, height); 
     
    17521752    /* pdm.h says that this has to be called from the EMT thread */ 
    17531753    PVMREQ pReq; 
    1754     int rcVBox = VMR3ReqCallVoid(pVM, &pReq, RT_INDEFINITE_WAIT, 
     1754    int rcVBox = VMR3ReqCallVoid(pVM, VMREQDEST_ALL, &pReq, RT_INDEFINITE_WAIT, 
    17551755                                 (PFNRT)mpDrv->pUpPort->pfnUpdateDisplayAll, 1, mpDrv->pUpPort); 
    17561756    if (VBOX_SUCCESS(rcVBox)) 
  • trunk/src/VBox/Main/MachineDebuggerImpl.cpp

    r13221 r13755  
    244244    PVMREQ pReq; 
    245245    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, 
    247247                             (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 
    248248    if (VBOX_SUCCESS(rcVBox)) 
     
    313313    PVMREQ pReq; 
    314314    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, 
    316316                             (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 
    317317    if (VBOX_SUCCESS(rcVBox)) 
  • trunk/src/VBox/VMM/DBGF.cpp

    r13532 r13755  
    823823     */ 
    824824    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); 
    826826    if (RT_SUCCESS(rc)) 
    827827        rc = pReq->iStatus; 
  • trunk/src/VBox/VMM/DBGFBp.cpp

    r12989 r13755  
    288288     */ 
    289289    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); 
    291291    if (VBOX_SUCCESS(rc)) 
    292292        rc = pReq->iStatus; 
     
    437437     */ 
    438438    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); 
    440440    if (VBOX_SUCCESS(rc)) 
    441441        rc = pReq->iStatus; 
     
    602602     */ 
    603603    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); 
    605605    if (VBOX_SUCCESS(rc)) 
    606606        rc = pReq->iStatus; 
     
    698698     */ 
    699699    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); 
    701701    if (VBOX_SUCCESS(rc)) 
    702702        rc = pReq->iStatus; 
     
    775775     */ 
    776776    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); 
    778778    if (VBOX_SUCCESS(rc)) 
    779779        rc = pReq->iStatus; 
     
    852852     */ 
    853853    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); 
    855855    if (VBOX_SUCCESS(rc)) 
    856856        rc = pReq->iStatus; 
     
    928928     */ 
    929929    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); 
    931931    if (VBOX_SUCCESS(rc)) 
    932932        rc = pReq->iStatus; 
  • trunk/src/VBox/VMM/DBGFInfo.cpp

    r12989 r13755  
    717717            case DBGFINFOTYPE_DEV: 
    718718                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); 
    720720                else 
    721721                    Info.u.Dev.pfnHandler(Info.u.Dev.pDevIns, pHlp, pszArgs); 
     
    724724            case DBGFINFOTYPE_DRV: 
    725725                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); 
    727727                else 
    728728                    Info.u.Drv.pfnHandler(Info.u.Drv.pDrvIns, pHlp, pszArgs); 
     
    731731            case DBGFINFOTYPE_INT: 
    732732                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); 
    734734                else 
    735735                    Info.u.Int.pfnHandler(pVM, pHlp, pszArgs); 
     
    738738            case DBGFINFOTYPE_EXT: 
    739739                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); 
    741741                else 
    742742                    Info.u.Ext.pfnHandler(Info.u.Ext.pvUser, pHlp, pszArgs); 
  • trunk/src/VBox/VMM/DBGFLog.cpp

    r12989 r13755  
    5353 
    5454    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); 
    5656    if (VBOX_SUCCESS(rc)) 
    5757        rc = pReq->iStatus; 
     
    9090 
    9191    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); 
    9393    if (VBOX_SUCCESS(rc)) 
    9494        rc = pReq->iStatus; 
     
    127127 
    128128    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); 
    130130    if (VBOX_SUCCESS(rc)) 
    131131        rc = pReq->iStatus; 
  • trunk/src/VBox/VMM/DBGFMem.cpp

    r13685 r13755  
    113113{ 
    114114    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, 
    116116                         pVM, pAddress, cbRange, pabNeedle, cbNeedle, pHitAddress); 
    117117    if (VBOX_SUCCESS(rc)) 
     
    180180{ 
    181181    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, 
    183183                          pVM, pAddress, pvBuf, cbRead); 
    184184    if (VBOX_SUCCESS(rc)) 
     
    277277     */ 
    278278    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, 
    280280                          pVM, pAddress, pszBuf, cchBuf); 
    281281    if (VBOX_SUCCESS(rc)) 
  • trunk/src/VBox/VMM/DBGFOS.cpp

    r12989 r13755  
    115115     */ 
    116116    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); 
    118118    if (RT_SUCCESS(rc)) 
    119119        rc = pReq->iStatus; 
     
    223223     */ 
    224224    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); 
    226226    if (RT_SUCCESS(rc)) 
    227227        rc = pReq->iStatus; 
     
    307307     */ 
    308308    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, 
    310310                          5, pVM, pszName, cchName, pszVersion, cchVersion); 
    311311    if (RT_SUCCESS(rc)) 
     
    358358    void *pvIf = NULL; 
    359359    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); 
    361361    VMR3ReqFree(pReq); 
    362362 
  • trunk/src/VBox/VMM/DBGFStack.cpp

    r12989 r13755  
    357357 
    358358    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, 
    360360                         pVM, pFrame, CPUMGetGuestCtxCore(pVM), true); 
    361361    if (VBOX_SUCCESS(rc)) 
     
    388388 
    389389    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, 
    391391                         pVM, pFrame, CPUMGetHyperCtxCore(pVM), 4); 
    392392    if (VBOX_SUCCESS(rc)) 
  • trunk/src/VBox/VMM/PATM/CSAM.cpp

    r13532 r13755  
    19551955        Log(("CSAMCodePageWriteHandler: delayed write!\n")); 
    19561956        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, 
    19581958                           (PFNRT)CSAMDelayedWriteHandler, 3, pVM, (RTRCPTR)GCPtr, cbBuf); 
    19591959    } 
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r13371 r13755  
    19751975        AssertMsg(!PDMCritSectIsOwner(&pVM->pgm.s.CritSect), ("We own the PGM lock -> deadlock danger!!\n")); 
    19761976 
    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); 
    19781978        if (VBOX_SUCCESS(rc)) 
    19791979        { 
  • trunk/src/VBox/VMM/PGMPool.cpp

    r13543 r13755  
    546546        if (!pPage->fReusedFlushPending) 
    547547        { 
    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); 
    549549            AssertRCReturn(rc, rc); 
    550550            pPage->fReusedFlushPending = true; 
  • trunk/src/VBox/VMM/VM.cpp

    r13751 r13755  
    229229             */ 
    230230            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, 
    232232                              4, pUVM, cCPUs, pfnCFGMConstructor, pvUserCFGM); 
    233233            if (RT_SUCCESS(rc)) 
     
    903903     */ 
    904904    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); 
    906906    if (VBOX_SUCCESS(rc)) 
    907907    { 
     
    973973     */ 
    974974    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); 
    976976    if (VBOX_SUCCESS(rc)) 
    977977    { 
     
    10601060     */ 
    10611061    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); 
    10631063    if (VBOX_SUCCESS(rc)) 
    10641064    { 
     
    11411141     */ 
    11421142    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); 
    11441144    if (VBOX_SUCCESS(rc)) 
    11451145    { 
     
    12361236     */ 
    12371237    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); 
    12391239    if (VBOX_SUCCESS(rc)) 
    12401240    { 
     
    13251325     */ 
    13261326    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); 
    13281328    if (VBOX_SUCCESS(rc)) 
    13291329    { 
     
    14951495         */ 
    14961496        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); 
    14981498        if (RT_SUCCESS(rc)) 
    14991499            rc = pReq->iStatus; 
     
    18811881     */ 
    18821882    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); 
    18841884    while (rc == VERR_TIMEOUT) 
    18851885        rc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT); 
     
    23992399     */ 
    24002400    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); 
    24022402    if (VBOX_FAILURE(rc)) 
    24032403        return rc; 
     
    24682468     */ 
    24692469    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); 
    24712471    if (VBOX_FAILURE(rc)) 
    24722472        return rc; 
     
    25702570     */ 
    25712571    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); 
    25732573    if (VBOX_FAILURE(rc)) 
    25742574        return rc; 
     
    26392639     */ 
    26402640    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); 
    26422642    if (VBOX_FAILURE(rc)) 
    26432643        return rc; 
     
    28552855     */ 
    28562856    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); 
    28582858    if (VBOX_FAILURE(rc)) 
    28592859        return rc; 
     
    29242924     */ 
    29252925    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); 
    29272927    if (VBOX_FAILURE(rc)) 
    29282928        return rc; 
  • trunk/src/VBox/VMM/VMInternal.h

    r13667 r13755  
    413413 
    414414 
     415/** 
     416 * VMCPU internal data kept in the UVM. 
     417 * 
     418 * Almost a copy of VMINTUSERPERVM. Separate data properly later on. 
     419 */ 
     420typedef 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. */