VirtualBox

Changeset 19300 in vbox for trunk


Ignore:
Timestamp:
May 1, 2009 6:06:59 PM (16 years ago)
Author:
vboxsync
Message:

VMReq,*: Replaced VMREQDEST with VMCPUID because it's a pain to have to cast CPU IDs all the time.

Location:
trunk
Files:
41 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/types.h

    r19285 r19300  
    9999typedef VMCPUID *PVMCPUID;
    100100/** @name Special CPU ID values.
     101 * Most of these are for request scheduling.
     102 *
    101103 * @{ */
    102104/** 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.
    105109 * 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)
    107111/** The NIL value. */
    108 #define NIL_VMCPUID         UINT32_C(0xfffffff0)
     112#define NIL_VMCPUID         UINT32_C(0xfffffffd)
    109113/** @} */
     114
    110115
    111116/** VM State
  • trunk/include/VBox/vmapi.h

    r19284 r19300  
    266266} VMREQFLAGS;
    267267
    268 /**
    269  * Request destination
    270  */
    271 typedef enum VMREQDEST
    272 {
    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               = 0x1002
    284 } 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))
    290268
    291269/**
     
    318296    VMREQTYPE               enmType;
    319297    /** Request destination. */
    320     VMREQDEST               enmDest;
     298    VMCPUID                 idDstCpu;
    321299    /** Request specific data. */
    322300    union VMREQ_U
     
    426404VMMR3DECL(int)  VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
    427405VMMR3DECL(int)  VMR3SetRuntimeErrorWorker(PVM pVM);
    428 VMMR3DECL(int)  VMR3ReqCall(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    429 VMMR3DECL(int)  VMR3ReqCallVoidU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    430 VMMR3DECL(int)  VMR3ReqCallVoid(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    431 VMMR3DECL(int)  VMR3ReqCallEx(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
    432 VMMR3DECL(int)  VMR3ReqCallU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
    433 VMMR3DECL(int)  VMR3ReqCallVU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
    434 VMMR3DECL(int)  VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest);
    435 VMMR3DECL(int)  VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest);
     406VMMR3DECL(int)  VMR3ReqCall(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
     407VMMR3DECL(int)  VMR3ReqCallVoidU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
     408VMMR3DECL(int)  VMR3ReqCallVoid(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
     409VMMR3DECL(int)  VMR3ReqCallEx(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
     410VMMR3DECL(int)  VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
     411VMMR3DECL(int)  VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
     412VMMR3DECL(int)  VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
     413VMMR3DECL(int)  VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu);
    436414VMMR3DECL(int)  VMR3ReqFree(PVMREQ pReq);
    437415VMMR3DECL(int)  VMR3ReqQueue(PVMREQ pReq, unsigned cMillies);
    438416VMMR3DECL(int)  VMR3ReqWait(PVMREQ pReq, unsigned cMillies);
    439 VMMR3DECL(int)  VMR3ReqProcessU(PUVM pUVM, VMREQDEST enmDest);
     417VMMR3DECL(int)  VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu);
    440418VMMR3DECL(void) VMR3NotifyGlobalFF(PVM pVM, bool fNotifiedREM);
    441419VMMR3DECL(void) VMR3NotifyGlobalFFU(PUVM pUVM, bool fNotifiedREM);
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r18927 r19300  
    14081408
    14091409    pCtl->fRedoIdle = true;
    1410     rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1410    rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    14111411                     (PFNRT)PDMDevHlpVMSuspend, 1, pDevIns);
    14121412    AssertReleaseRC(rc);
     
    28882888
    28892889                        PDMCritSectLeave(&pCtl->lock);
    2890                         rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     2890                        rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    28912891                                         (PFNRT)s->pDrvMount->pfnUnmount, 2, s->pDrvMount, false);
    28922892                        AssertReleaseRC(rc);
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r18668 r19300  
    249249        PVMREQ pReq;
    250250
    251         rc = VMR3ReqCallVoid (pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     251        rc = VMR3ReqCallVoid (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    252252                              (PFNRT) vmmdevCtlGuestFilterMask_EMT,
    253253                              3, pVMMDevState, u32OrMask, u32NotMask);
     
    274274     * about something, which has already happened.
    275275     */
    276     rc = VMR3ReqCallEx(pVM, VMREQDEST_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,
     276    rc = VMR3ReqCallEx(pVM, VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,
    277277                       (PFNRT) vmmdevNotifyGuest_EMT,
    278278                       2, pVMMDevState, u32EventMask);
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

    r18435 r19300  
    11381138
    11391139    /* Not safe to execute asynchroneously; forward to EMT */
    1140     int rc = VMR3ReqCallEx(PDMDevHlpGetVM(pVMMDevState->pDevIns), VMREQDEST_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,
     1140    int rc = VMR3ReqCallEx(PDMDevHlpGetVM(pVMMDevState->pDevIns), VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,
    11411141                           (PFNRT)hgcmCompletedWorker, 3, pInterface, result, pCmd);
    11421142    AssertRC(rc);
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp

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

    r17339 r19300  
    244244    LogFlowMember (("Console::AttachUSBDevice: Proxying USB device '%s' %RTuuid...\n", Address.c_str(), &Uuid));
    245245    PVMREQ pReq;
    246     vrc = VMR3ReqCall (mpVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     246    vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    247247                       (PFNRT)pRhConfig->pfnCreateProxyDevice,
    248248                       5, pRhConfig, &Uuid, fRemote,
     
    303303            LogFlowMember (("Console::DetachUSBDevice: Detaching USB proxy device %RTuuid...\n", &Uuid));
    304304            PVMREQ pReq;
    305             vrc = VMR3ReqCall (mpVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)pRhConfig->pfnDestroyProxyDevice,
     305            vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)pRhConfig->pfnDestroyProxyDevice,
    306306                               2, pRhConfig, &Uuid);
    307307            if (RT_SUCCESS (vrc))
  • trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp

    r13837 r19300  
    138138    PVMREQ pReq;
    139139    EMRAWMODE rawModeFlag = enable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE;
    140     int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     140    int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    141141                             (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag);
    142142    if (RT_SUCCESS(rcVBox))
     
    198198    PVMREQ pReq;
    199199    EMRAWMODE rawModeFlag = enable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE;
    200     int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     200    int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    201201                             (PFNRT)EMR3RawSetMode, 2, pVM, rawModeFlag);
    202202    if (RT_SUCCESS(rcVBox))
  • trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp

    r18645 r19300  
    966966            /* Power off VM */
    967967            PVMREQ pReq;
    968             rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);
     968            rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);
    969969        }
    970970
     
    12781278        {
    12791279            startProgressInfo("Restoring");
    1280             rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1280            rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    12811281                             (PFNRT)VMR3Load, 4, pVM, g_pszStateFile, &callProgressInfo, (uintptr_t)NULL);
    12821282            endProgressInfo();
     
    12841284            {
    12851285                VMR3ReqFree(pReq);
    1286                 rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1286                rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    12871287                                 (PFNRT)VMR3Resume, 1, pVM);
    12881288                if (RT_SUCCESS(rc))
     
    12981298        else
    12991299        {
    1300             rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);
     1300            rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);
    13011301            if (RT_SUCCESS(rc))
    13021302            {
  • trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp

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

    r19289 r19300  
    27942794     */
    27952795    PVMREQ pReq;
    2796     int vrc = VMR3ReqCall (mpVM, VMREQDEST_ANY, &pReq, 0 /* no wait! */,
     2796    int vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, 0 /* no wait! */,
    27972797                           (PFNRT) Console::changeDrive, 8,
    27982798                           this, pszDevice, uInstance, uLun, eState, peState,
     
    54965496/** @todo just do everything here and only wrap the PDMR3Usb call. That'll offload some notification stuff from the EMT thread. */
    54975497    PVMREQ pReq = NULL;
    5498     int vrc = VMR3ReqCall (mpVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     5498    int vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    54995499                           (PFNRT) usbAttachCallback, 6, this, aHostDevice, uuid.ptr(), fRemote, Address.raw(), aMaskedIfs);
    55005500    if (VBOX_SUCCESS (vrc))
     
    56215621    PVMREQ pReq;
    56225622/** @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, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     5623    int vrc = VMR3ReqCall (mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    56245624                           (PFNRT) usbDetachCallback, 4,
    56255625                           this, &aIt, (*aIt)->id().raw());
     
    69806980                 *  to access Console.
    69816981                 */
    6982                 int vrc = VMR3ReqCall (that->mpVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     6982                int vrc = VMR3ReqCall (that->mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    69836983                                       (PFNRT)reconfigureHardDisks, 5, that->mpVM, lInstance,
    69846984                                       enmController, atts [i], &rc);
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r18669 r19300  
    13851385        /* send request to the EMT thread */
    13861386        PVMREQ pReq = NULL;
    1387         int vrc = VMR3ReqCall (pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1387        int vrc = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    13881388                               (PFNRT) changeFramebuffer, 4,
    13891389                               this, static_cast <IFramebuffer *> (frameBuf),
     
    14721472        /* send request to the EMT thread */
    14731473        PVMREQ pReq = NULL;
    1474         int vrc = VMR3ReqCall (pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1474        int vrc = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    14751475            (PFNRT) changeFramebuffer, 4, this, frameBuf, false /* aInternal */,
    14761476            VBOX_VIDEO_PRIMARY_SCREEN);
     
    15151515        /* send request to the EMT thread */
    15161516        PVMREQ pReq = NULL;
    1517         int vrc = VMR3ReqCall (pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1517        int vrc = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    15181518            (PFNRT) changeFramebuffer, 4, this, aFramebuffer, false /* aInternal */,
    15191519            aScreenId);
     
    16731673        PVMREQ pReq;
    16741674        size_t cbData = RT_ALIGN_Z(width, 4) * 4 * height;
    1675         rcVBox = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1675        rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    16761676            (PFNRT)mpDrv->pUpPort->pfnSnapshot, 6, mpDrv->pUpPort,
    16771677            address, cbData, (uintptr_t)NULL, (uintptr_t)NULL, (uintptr_t)NULL);
     
    17331733     */
    17341734    PVMREQ pReq;
    1735     int rcVBox = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1735    int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    17361736        (PFNRT)mpDrv->pUpPort->pfnDisplayBlt, 6, mpDrv->pUpPort,
    17371737        address, x, y, width, height);
     
    17961796    /* pdm.h says that this has to be called from the EMT thread */
    17971797    PVMREQ pReq;
    1798     int rcVBox = VMR3ReqCallVoid(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     1798    int rcVBox = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    17991799        (PFNRT)mpDrv->pUpPort->pfnUpdateDisplayAll, 1, mpDrv->pUpPort);
    18001800    if (RT_SUCCESS(rcVBox))
  • trunk/src/VBox/Main/MachineDebuggerImpl.cpp

    r18927 r19300  
    200200    PVMREQ pReq;
    201201    EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE;
    202     int rcVBox = VMR3ReqCall (pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     202    int rcVBox = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    203203                              (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag);
    204204    if (RT_SUCCESS (rcVBox))
     
    268268    PVMREQ pReq;
    269269    EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE;
    270     int rcVBox = VMR3ReqCall (pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     270    int rcVBox = VMR3ReqCall (pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    271271                              (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag);
    272272    if (RT_SUCCESS (rcVBox))
  • trunk/src/VBox/VMM/DBGF.cpp

    r19286 r19300  
    632632            {
    633633                LogFlow(("dbgfR3VMMWait: Processes requests...\n"));
    634                 rc = VMR3ReqProcessU(pVM->pUVM, VMREQDEST_ANY);
     634                rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY);
    635635                LogFlow(("dbgfR3VMMWait: VMR3ReqProcess -> %Rrc rcRet=%Rrc\n", rc, rcRet));
    636636                if (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST)
     
    846846     */
    847847    PVMREQ pReq;
    848     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3Attach, 1, pVM);
     848    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)dbgfR3Attach, 1, pVM);
    849849    if (RT_SUCCESS(rc))
    850850        rc = pReq->iStatus;
  • trunk/src/VBox/VMM/DBGFAddr.cpp

    r19293 r19300  
    235235        {
    236236            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,
    238238                             (PFNRT)dbgfR3AddrToPhysOnVCpu, 3, pVCpu, pAddress, pGCPhys);
    239239            if (RT_SUCCESS(rc))
     
    400400     */
    401401    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,
    403403                         (PFNRT)dbgfR3AddrToVolatileR3PtrOnVCpu, 5, pVM, idCpu, pAddress, fReadOnly, ppvR3Ptr);
    404404    if (RT_SUCCESS(rc))
  • trunk/src/VBox/VMM/DBGFBp.cpp

    r19286 r19300  
    288288     */
    289289    PVMREQ pReq;
    290     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    291291    if (RT_SUCCESS(rc))
    292292        rc = pReq->iStatus;
     
    449449     */
    450450    PVMREQ pReq;
    451     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    452452    if (RT_SUCCESS(rc))
    453453        rc = pReq->iStatus;
     
    620620     */
    621621    PVMREQ pReq;
    622     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    623623    if (RT_SUCCESS(rc))
    624624        rc = pReq->iStatus;
     
    716716     */
    717717    PVMREQ pReq;
    718     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    719719    if (RT_SUCCESS(rc))
    720720        rc = pReq->iStatus;
     
    793793     */
    794794    PVMREQ pReq;
    795     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    796796    if (RT_SUCCESS(rc))
    797797        rc = pReq->iStatus;
     
    870870     */
    871871    PVMREQ pReq;
    872     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    873873    if (RT_SUCCESS(rc))
    874874        rc = pReq->iStatus;
     
    946946     */
    947947    PVMREQ pReq;
    948     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    949949    if (RT_SUCCESS(rc))
    950950        rc = pReq->iStatus;
  • trunk/src/VBox/VMM/DBGFDisas.cpp

    r19294 r19300  
    552552    {
    553553        PVMREQ pReq = NULL;
    554         rc = VMR3ReqCall(pVM, VMREQDEST_FROM_ID(idCpu), &pReq, RT_INDEFINITE_WAIT,
     554        rc = VMR3ReqCall(pVM, idCpu, &pReq, RT_INDEFINITE_WAIT,
    555555                         (PFNRT)dbgfR3DisasInstrExOnVCpu, 8,
    556556                         pVM, VMMGetCpuById(pVM, idCpu), Sel, &GCPtr, fFlags, pszOutput, cchOutput, pcbInstr);
  • trunk/src/VBox/VMM/DBGFInfo.cpp

    r13818 r19300  
    717717            case DBGFINFOTYPE_DEV:
    718718                if (Info.fFlags & DBGFINFO_FLAGS_RUN_ON_EMT)
    719                     rc = VMR3ReqCallVoid(pVM, VMREQDEST_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);
    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, VMREQDEST_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);
    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, VMREQDEST_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);
    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, VMREQDEST_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);
    741741                else
    742742                    Info.u.Ext.pfnHandler(Info.u.Ext.pvUser, pHlp, pszArgs);
  • trunk/src/VBox/VMM/DBGFLog.cpp

    r13816 r19300  
    5353
    5454    PVMREQ pReq;
    55     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    5656    if (RT_SUCCESS(rc))
    5757        rc = pReq->iStatus;
     
    9090
    9191    PVMREQ pReq;
    92     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    9393    if (RT_SUCCESS(rc))
    9494        rc = pReq->iStatus;
     
    127127
    128128    PVMREQ pReq;
    129     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    130130    if (RT_SUCCESS(rc))
    131131        rc = pReq->iStatus;
  • trunk/src/VBox/VMM/DBGFMem.cpp

    r19293 r19300  
    123123
    124124    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,
    126126                         (PFNRT)dbgfR3MemScan, 7, pVM, idCpu, pAddress, &cbRange, pabNeedle, cbNeedle, pHitAddress);
    127127    if (RT_SUCCESS(rc))
     
    205205
    206206    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,
    208208                          (PFNRT)dbgfR3MemRead, 5, pVM, idCpu, pAddress, pvBuf, cbRead);
    209209    if (RT_SUCCESS(rc))
     
    290290     */
    291291    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,
    293293                          (PFNRT)dbgfR3MemReadString, 5, pVM, idCpu, pAddress, pszBuf, cchBuf);
    294294    if (RT_SUCCESS(rc))
     
    373373
    374374    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,
    376376                          (PFNRT)dbgfR3MemWrite, 5, pVM, idCpu, pAddress, pvBuf, cbWrite);
    377377    if (RT_SUCCESS(rc))
  • trunk/src/VBox/VMM/DBGFOS.cpp

    r13782 r19300  
    115115     */
    116116    PVMREQ pReq;
    117     int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_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);
    118118    if (RT_SUCCESS(rc))
    119119        rc = pReq->iStatus;
     
    223223     */
    224224    PVMREQ pReq;
    225     int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_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);
    226226    if (RT_SUCCESS(rc))
    227227        rc = pReq->iStatus;
     
    307307     */
    308308    PVMREQ pReq;
    309     int rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, 0, (PFNRT)dbgfR3OSQueryNameAndVersion,
     309    int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &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, VMREQDEST_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);
    361361    VMR3ReqFree(pReq);
    362362
  • trunk/src/VBox/VMM/DBGFStack.cpp

    r19293 r19300  
    400400                             : CPUMGetHyperCtxCore(VMMGetCpuById(pVM, idCpu));
    401401    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,
    403403                         (PFNRT)dbgfR3StackWalkCtxFull, 9,
    404404                         pVM, idCpu, pCtxCore, fGuest,
  • trunk/src/VBox/VMM/EM.cpp

    r19298 r19300  
    33903390        if (VM_FF_IS_PENDING_EXCEPT(pVM, VM_FF_REQUEST, VM_FF_PGM_NO_MEMORY))
    33913391        {
    3392             rc2 = VMR3ReqProcessU(pVM->pUVM, VMREQDEST_ANY);
     3392            rc2 = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY);
    33933393            if (rc2 == VINF_EM_OFF || rc2 == VINF_EM_TERMINATE)
    33943394            {
     
    34243424        if (VMCPU_FF_IS_PENDING_EXCEPT(pVCpu, VMCPU_FF_REQUEST, VM_FF_PGM_NO_MEMORY))
    34253425        {
    3426             rc2 = VMR3ReqProcessU(pVM->pUVM, (VMREQDEST)pVCpu->idCpu);
     3426            rc2 = VMR3ReqProcessU(pVM->pUVM, pVCpu->idCpu);
    34273427            if (rc2 == VINF_EM_OFF || rc2 == VINF_EM_TERMINATE)
    34283428            {
  • trunk/src/VBox/VMM/PATM/CSAM.cpp

    r19263 r19300  
    19791979        Log(("CSAMCodePageWriteHandler: delayed write!\n"));
    19801980        AssertCompileSize(RTRCPTR, 4);
    1981         rc = VMR3ReqCallEx(pVM, VMREQDEST_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,
     1981        rc = VMR3ReqCallEx(pVM, VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID,
    19821982                           (PFNRT)CSAMDelayedWriteHandler, 3, pVM, (RTRCPTR)GCPtr, cbBuf);
    19831983    }
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r18927 r19300  
    149149
    150150                    PVMREQ pReq = NULL;
    151                     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     151                    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    152152                                         (PFNRT)pgmR3PhysReadExternalEMT, 4, pVM, &GCPhys, pvBuf, cbRead);
    153153                    if (RT_SUCCESS(rc))
     
    285285
    286286                    PVMREQ pReq = NULL;
    287                     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     287                    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    288288                                         (PFNRT)pgmR3PhysWriteExternalEMT, 4, pVM, &GCPhys, pvBuf, cbWrite);
    289289                    if (RT_SUCCESS(rc))
     
    447447
    448448                PVMREQ pReq = NULL;
    449                 rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT,
     449                rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
    450450                                 (PFNRT)pgmR3PhysGCPhys2CCPtrDelegated, 4, pVM, &GCPhys, ppv, pLock);
    451451                if (RT_SUCCESS(rc))
  • trunk/src/VBox/VMM/PGMPool.cpp

    r19141 r19300  
    533533        if (!pPage->fReusedFlushPending)
    534534        {
    535             int rc = VMR3ReqCallEx(pPool->pVMR3, VMREQDEST_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);
    536536            AssertRCReturn(rc, rc);
    537537            pPage->fReusedFlushPending = true;
  • trunk/src/VBox/VMM/VM.cpp

    r19293 r19300  
    239239             */
    240240            PVMREQ pReq;
    241             rc = VMR3ReqCallU(pUVM, VMREQDEST_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,
    242242                              4, pUVM, cCPUs, pfnCFGMConstructor, pvUserCFGM);
    243243            if (RT_SUCCESS(rc))
     
    10351035     */
    10361036    PVMREQ pReq;
    1037     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOn, 1, pVM);
     1037    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOn, 1, pVM);
    10381038    if (RT_SUCCESS(rc))
    10391039    {
     
    11051105     */
    11061106    PVMREQ pReq;
    1107     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Suspend, 1, pVM);
     1107    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Suspend, 1, pVM);
    11081108    if (RT_SUCCESS(rc))
    11091109    {
     
    11921192     */
    11931193    PVMREQ pReq;
    1194     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Resume, 1, pVM);
     1194    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3Resume, 1, pVM);
    11951195    if (RT_SUCCESS(rc))
    11961196    {
     
    12731273     */
    12741274    PVMREQ pReq;
    1275     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    12761276    if (RT_SUCCESS(rc))
    12771277    {
     
    13681368     */
    13691369    PVMREQ pReq;
    1370     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    13711371    if (RT_SUCCESS(rc))
    13721372    {
     
    14571457     */
    14581458    PVMREQ pReq;
    1459     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOff, 1, pVM);
     1459    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3PowerOff, 1, pVM);
    14601460    if (RT_SUCCESS(rc))
    14611461    {
     
    16301630         */
    16311631        PVMREQ pReq = NULL;
    1632         int rc = VMR3ReqCallU(pUVM, VMREQDEST_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);
    16331633        if (RT_SUCCESS(rc))
    16341634            rc = pReq->iStatus;
     
    20772077     */
    20782078    PVMREQ pReq = NULL;
    2079     rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, 0, (PFNRT)vmR3Reset, 1, pVM);
     2079    rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, 0, (PFNRT)vmR3Reset, 1, pVM);
    20802080    while (rc == VERR_TIMEOUT)
    20812081        rc = VMR3ReqWait(pReq, RT_INDEFINITE_WAIT);
     
    25972597     */
    25982598    PVMREQ pReq;
    2599     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    26002600    if (RT_FAILURE(rc))
    26012601        return rc;
     
    26662666     */
    26672667    PVMREQ pReq;
    2668     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    26692669    if (RT_FAILURE(rc))
    26702670        return rc;
     
    27682768     */
    27692769    PVMREQ pReq;
    2770     int rc = VMR3ReqCallU(pUVM, VMREQDEST_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);
    27712771    if (RT_FAILURE(rc))
    27722772        return rc;
     
    28372837     */
    28382838    PVMREQ pReq;
    2839     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    28402840    if (RT_FAILURE(rc))
    28412841        return rc;
     
    30533053     */
    30543054    PVMREQ pReq;
    3055     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    30563056    if (RT_FAILURE(rc))
    30573057        return rc;
     
    31223122     */
    31233123    PVMREQ pReq;
    3124     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    31253125    if (RT_FAILURE(rc))
    31263126        return rc;
  • trunk/src/VBox/VMM/VMEmt.cpp

    r19299 r19300  
    101101                 * Service execute in EMT request.
    102102                 */
    103                 rc = VMR3ReqProcessU(pUVM, VMREQDEST_ANY);
     103                rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY);
    104104                Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %d -> %d\n", rc, enmBefore, pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING));
    105105            }
     
    110110                 * Service execute in EMT request.
    111111                 */
    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));
    114114            }
    115115            else
     
    145145                 * Service execute in EMT request.
    146146                 */
    147                 rc = VMR3ReqProcessU(pUVM, VMREQDEST_ANY);
     147                rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY);
    148148                Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %d -> %d\n", rc, enmBefore, pVM->enmVMState));
    149149            }
     
    153153                 * Service execute in EMT request.
    154154                 */
    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));
    157157            }
    158158            else if (VM_FF_ISSET(pVM, VM_FF_DBGF))
     
    280280             * Service execute in EMT request.
    281281             */
    282             rc = VMR3ReqProcessU(pUVM, VMREQDEST_ANY);
     282            rc = VMR3ReqProcessU(pUVM, VMCPUID_ANY);
    283283            Log(("vmR3EmulationThread: Req rc=%Rrc, VM state %d -> %d\n", rc, enmBefore, pVM->enmVMState));
    284284        }
     
    288288             * Service execute in EMT request.
    289289             */
    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));
    292292        }
    293293        else if (VM_FF_ISSET(pVM, VM_FF_DBGF))
  • trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp

    r19217 r19300  
    192192#else /* IN_RING3: */
    193193    PVMREQ pReq;
    194     VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PDMR3QueueFlushWorker, 2, pVM, pQueue);
     194    VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PDMR3QueueFlushWorker, 2, pVM, pQueue);
    195195    VMR3ReqFree(pReq);
    196196#endif
  • trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp

    r19217 r19300  
    661661#ifdef IN_RING3
    662662    PVMREQ pReq;
    663     int rc = VMR3ReqCall(pVM, VMREQDEST_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);
    664664    if (RT_SUCCESS(rc))
    665665        rc = pReq->iStatus;
  • trunk/src/VBox/VMM/VMMAll/VMAll.cpp

    r18649 r19300  
    8686    va_copy(va2, args); /* Have to make a copy here or GCC will break. */
    8787    PVMREQ pReq;
    88     VMR3ReqCall(pVM, VMREQDEST_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! */
    8989                pVM->pUVM, rc, RT_SRC_POS_ARGS, pszFormat, &va2);
    9090    VMR3ReqFree(pReq);
     
    269269        ||  VM_IS_EMT(pVM))
    270270    {
    271         rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS,
     271        rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS,
    272272                          (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2);
    273273        if (RT_SUCCESS(rc))
     
    275275    }
    276276    else
    277         rc = VMR3ReqCallU(pVM->pUVM, VMREQDEST_ANY, &pReq, 0, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_NO_WAIT,
     277        rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, 0, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_NO_WAIT,
    278278                          (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2);
    279279    VMR3ReqFree(pReq);
  • trunk/src/VBox/VMM/VMReq.cpp

    r19299 r19300  
    6161 *
    6262 * @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.
    6466 * @param   ppReq           Where to store the pointer to the request.
    6567 *                          This will be NULL or a valid request pointer not matter what happends.
     
    7274 * @param   ...             Function arguments.
    7375 */
    74 VMMR3DECL(int) VMR3ReqCall(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     76VMMR3DECL(int) VMR3ReqCall(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    7577{
    7678    va_list va;
    7779    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);
    7981    va_end(va);
    8082    return rc;
     
    9597 *
    9698 * @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.
    98102 * @param   ppReq           Where to store the pointer to the request.
    99103 *                          This will be NULL or a valid request pointer not matter what happends.
     
    106110 * @param   ...             Function arguments.
    107111 */
    108 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     112VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    109113{
    110114    va_list va;
    111115    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);
    113117    va_end(va);
    114118    return rc;
     
    129133 *
    130134 * @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.
    132138 * @param   ppReq           Where to store the pointer to the request.
    133139 *                          This will be NULL or a valid request pointer not matter what happends.
     
    140146 * @param   ...             Function arguments.
    141147 */
    142 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     148VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    143149{
    144150    va_list va;
    145151    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);
    147153    va_end(va);
    148154    return rc;
     
    163169 *
    164170 * @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.
    166174 * @param   ppReq           Where to store the pointer to the request.
    167175 *                          This will be NULL or a valid request pointer not matter what happends, unless fFlags
     
    176184 * @param   ...             Function arguments.
    177185 */
    178 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
     186VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
    179187{
    180188    va_list va;
    181189    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);
    183191    va_end(va);
    184192    return rc;
     
    199207 *
    200208 * @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.
    202212 * @param   ppReq           Where to store the pointer to the request.
    203213 *                          This will be NULL or a valid request pointer not matter what happends, unless fFlags
     
    212222 * @param   ...             Function arguments.
    213223 */
    214 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
     224VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
    215225{
    216226    va_list va;
    217227    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);
    219229    va_end(va);
    220230    return rc;
     
    235245 *
    236246 * @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.
    238250 * @param   ppReq           Where to store the pointer to the request.
    239251 *                          This will be NULL or a valid request pointer not matter what happends, unless fFlags
     
    248260 * @param   Args            Argument vector.
    249261 */
    250 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)
     262VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)
    251263{
    252264    LogFlow(("VMR3ReqCallV: cMillies=%d fFlags=%#x pfnFunction=%p cArgs=%d\n", cMillies, fFlags, pfnFunction, cArgs));
     
    271283     * Allocate request
    272284     */
    273     int rc = VMR3ReqAllocU(pUVM, &pReq, VMREQTYPE_INTERNAL, enmDest);
     285    int rc = VMR3ReqAllocU(pUVM, &pReq, VMREQTYPE_INTERNAL, idDstCpu);
    274286    if (RT_FAILURE(rc))
    275287        return rc;
     
    370382 * @param   ppReq           Where to store the pointer to the allocated packet.
    371383 * @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 */
     388VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu)
     389{
     390    return VMR3ReqAllocU(pVM->pUVM, ppReq, enmType, idDstCpu);
    377391}
    378392
     
    389403 * @param   ppReq           Where to store the pointer to the allocated packet.
    390404 * @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 */
     409VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu)
    394410{
    395411    /*
     
    401417                    VERR_VM_REQUEST_INVALID_TYPE);
    402418    AssertPtrReturn(ppReq, VERR_INVALID_POINTER);
    403     AssertMsgReturn(    enmDest == VMREQDEST_ANY
    404                     ||  enmDest == VMREQDEST_BROADCAST
    405                     ||  enmDest == VMREQDEST_BROADCAST_REVERSE
    406                     || (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);
    408424
    409425    /*
     
    476492            pReq->fFlags   = VMREQFLAGS_VBOX_STATUS;
    477493            pReq->enmType  = enmType;
    478             pReq->enmDest  = enmDest;
     494            pReq->idDstCpu = idDstCpu;
    479495
    480496            *ppReq = pReq;
     
    513529    pReq->fFlags   = VMREQFLAGS_VBOX_STATUS;
    514530    pReq->enmType  = enmType;
    515     pReq->enmDest  = enmDest;
     531    pReq->idDstCpu = idDstCpu;
    516532
    517533    *ppReq = pReq;
     
    626642    PUVMCPU pUVCpu  = (PUVMCPU)RTTlsGet(pUVM->vm.s.idxTLS);
    627643
    628     if (pReq->enmDest == VMREQDEST_BROADCAST)
     644    if (pReq->idDstCpu == VMCPUID_ALL)
    629645    {
    630646        /* One-by-one. */
     
    634650            /* Reinit some members. */
    635651            pReq->enmState = VMREQSTATE_ALLOCATED;
    636             pReq->enmDest = (VMREQDEST)i;
     652            pReq->idDstCpu = i;
    637653            rc = VMR3ReqQueue(pReq, cMillies);
    638654            if (RT_FAILURE(rc))
     
    640656        }
    641657    }
    642     else if (pReq->enmDest == VMREQDEST_BROADCAST_REVERSE)
     658    else if (pReq->idDstCpu == VMCPUID_ALL_REVERSE)
    643659    {
    644660        /* One-by-one. */
     
    648664            /* Reinit some members. */
    649665            pReq->enmState = VMREQSTATE_ALLOCATED;
    650             pReq->enmDest  = (VMREQDEST)i;
     666            pReq->idDstCpu = i;
    651667            rc = VMR3ReqQueue(pReq, cMillies);
    652668            if (RT_FAILURE(rc))
     
    654670        }
    655671    }
    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);
    661677        PVMCPU   pVCpu = &pUVM->pVM->aCpus[idTarget];
    662678        unsigned fFlags = ((VMREQ volatile *)pReq)->fFlags;     /* volatile paranoia */
     
    690706        LogFlow(("VMR3ReqQueue: returns %Rrc\n", rc));
    691707    }
    692     else if (    pReq->enmDest == VMREQDEST_ANY
     708    else if (    pReq->idDstCpu == VMCPUID_ANY
    693709             &&  !pUVCpu /* only EMT threads have a valid pointer stored in the TLS slot. */)
    694710    {
     
    809825 *
    810826 * @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 */
     831VMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VMCPUID idDstCpu)
     832{
     833    LogFlow(("VMR3ReqProcessU: (enmVMState=%d) idDstCpu=%d\n", pUVM->pVM ? pUVM->pVM->enmVMState : VMSTATE_CREATING, idDstCpu));
    816834
    817835    /*
     
    827845         * Get pending requests.
    828846         */
    829         void *volatile *ppReqs;
    830         if (enmDest == VMREQDEST_ANY)
     847        void * volatile *ppReqs;
     848        if (idDstCpu == VMCPUID_ANY)
    831849        {
    832850            ppReqs = (void * volatile *)&pUVM->vm.s.pReqs;
     
    836854        else
    837855        {
    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;
    839859            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);
    841861        }
    842 
    843862        PVMREQ pReqs = (PVMREQ)ASMAtomicXchgPtr(ppReqs, NULL);
    844863        if (!pReqs)
  • trunk/src/VBox/VMM/testcase/tstAnimate.cpp

    r14831 r19300  
    836836        PVMREQ pReq1 = NULL;
    837837        if (FileRawMem != NIL_RTFILE)
    838             rc = VMR3ReqCall(pVM, VMREQDEST_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);
    839839        else
    840             rc = VMR3ReqCall(pVM, VMREQDEST_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);
    841841        AssertReleaseRC(rc);
    842842        rc = pReq1->iStatus;
     
    849849            if (FileScript != NIL_RTFILE)
    850850            {
    851                 rc = VMR3ReqCall(pVM, VMREQDEST_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);
    852852                AssertReleaseRC(rc);
    853853                rc = pReq1->iStatus;
     
    877877                    if (RT_SUCCESS(rc))
    878878                    {
    879                         rc = VMR3ReqCall(pVM, VMREQDEST_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);
    880880                        AssertReleaseRC(rc);
    881881                        VMR3ReqFree(pReq1);
  • trunk/src/VBox/VMM/testcase/tstMicro.cpp

    r18927 r19300  
    354354         */
    355355        PVMREQ pReq1 = NULL;
    356         rc = VMR3ReqCallVoid(pVM, VMREQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)doit, 1, pVM);
     356        rc = VMR3ReqCallVoid(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)doit, 1, pVM);
    357357        AssertRC(rc);
    358358        VMR3ReqFree(pReq1);
  • trunk/src/VBox/VMM/testcase/tstVMM-2.cpp

    r14831 r19300  
    363363        {
    364364            PVMREQ pReq;
    365             rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);
     365            rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);
    366366            if (RT_SUCCESS(rc))
    367367            {
     
    378378                     * Power Off the VM.
    379379                     */
    380                     rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);
     380                    rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);
    381381                    if (RT_SUCCESS(rc))
    382382                    {
  • trunk/src/VBox/VMM/testcase/tstVMM-HwAccm.cpp

    r14831 r19300  
    9494        RTPrintf(TESTCASE ": Testing...\n");
    9595        PVMREQ pReq1 = NULL;
    96         rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoHwAccmTest, 1, pVM);
     96        rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoHwAccmTest, 1, pVM);
    9797        AssertRC(rc);
    9898        VMR3ReqFree(pReq1);
  • trunk/src/VBox/VMM/testcase/tstVMM.cpp

    r17364 r19300  
    7676        RTPrintf(TESTCASE ": Testing...\n");
    7777        PVMREQ pReq1 = NULL;
    78         rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM);
     78        rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM);
    7979        AssertRC(rc);
    8080        VMR3ReqFree(pReq1);
  • trunk/src/VBox/VMM/testcase/tstVMMFork.cpp

    r14831 r19300  
    137137                RTPrintf(TESTCASE ": testing VM after fork.\n");
    138138                PVMREQ pReq1 = NULL;
    139                 rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM);
     139                rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq1, RT_INDEFINITE_WAIT, (PFNRT)VMMDoTest, 1, pVM);
    140140                AssertRC(rc);
    141141                VMR3ReqFree(pReq1);
  • trunk/src/VBox/VMM/testcase/tstVMREQ.cpp

    r18645 r19300  
    135135
    136136    PVMREQ pReq;
    137     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5,
     137    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5,
    138138                         pVM, _4K, _1G, pszFormat, pvVA);
    139139    if (RT_SUCCESS(rc))
     
    157157    va_start(va1, pszFormat);
    158158    PVMREQ pReq;
    159     int rc = VMR3ReqCall(pVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5,
     159    int rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)PassVACallback, 5,
    160160                         pVM, _4K, _1G, pszFormat, &va1);
    161161    if (RT_SUCCESS(rc))
     
    186186        for (iReq = 0; iReq < cReqs; iReq++)
    187187        {
    188             rc = VMR3ReqAlloc(pVM, &apReq[iReq], VMREQTYPE_INTERNAL, VMREQDEST_ANY);
     188            rc = VMR3ReqAlloc(pVM, &apReq[iReq], VMREQTYPE_INTERNAL, VMCPUID_ANY);
    189189            if (RT_FAILURE(rc))
    190190            {
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r19293 r19300  
    933933{
    934934    { REMPARMDESC_FLAGS_INT,        sizeof(PVM), NULL },
    935     { REMPARMDESC_FLAGS_INT,        sizeof(VMREQDEST), NULL },
     935    { REMPARMDESC_FLAGS_INT,        sizeof(VMCPUID), NULL },
    936936    { REMPARMDESC_FLAGS_INT,        sizeof(PVMREQ *), NULL },
    937937    { REMPARMDESC_FLAGS_INT,        sizeof(unsigned), NULL },
  • trunk/src/recompiler/VBoxRecompiler.c

    r19293 r19300  
    35413541        return remR3DisasEnableStepping(pVM, fEnable);
    35423542
    3543     rc = VMR3ReqCall(pVM, VMREQDEST_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);
    35443544    AssertRC(rc);
    35453545    if (RT_SUCCESS(rc))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette