VirtualBox

Changeset 19257 in vbox


Ignore:
Timestamp:
Apr 29, 2009 11:51:55 AM (16 years ago)
Author:
vboxsync
Message:

Reapplied 46658 + fix

Location:
trunk
Files:
18 edited

Legend:

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

    r19255 r19257  
    447447 * @returns error code specific to uFunction.
    448448 * @param   pVMR0       Pointer to the Ring-0 (Host Context) mapping of the VM structure.
     449 * @param   idCpu       VMCPU id.
    449450 * @param   uOperation  Operation to execute.
    450451 * @param   pvArg       Argument.
    451452 */
    452 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg);
     453SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, void *pvArg);
    453454
    454455/**
     
    459460 * @param   pVMR0       The ring-0 VM handle.
    460461 * @param   uOperation  The operation; only the SUP_VMMR0_DO_* ones are valid.
    461  * @param   idCPU       VMCPU id.
    462  */
    463 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, unsigned idCPU);
     462 * @param   idCpu       VMCPU id.
     463 */
     464SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, unsigned idCpu);
    464465
    465466/**
     
    472473 * @returns error code specific to uFunction.
    473474 * @param   pVMR0       Pointer to the Ring-0 (Host Context) mapping of the VM structure.
     475 * @param   idCpu       VMCPU id.
    474476 * @param   uOperation  Operation to execute.
    475477 * @param   u64Arg      Constant argument.
     
    478480 *                      limit on this, just below 4KB.
    479481 */
    480 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
     482SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
    481483
    482484/**
  • trunk/include/VBox/vmm.h

    r18927 r19257  
    296296VMMR0DECL(int)      VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg);
    297297VMMR0DECL(void)     VMMR0EntryFast(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation);
    298 VMMR0DECL(int)      VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);
     298VMMR0DECL(int)      VMMR0EntryEx(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);
    299299VMMR0DECL(int)      VMMR0TermVM(PVM pVM, PGVM pGVM);
    300300VMMR0DECL(int)      VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);
  • trunk/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp

    r19255 r19257  
    312312    SendReq.pSession = pSession;
    313313    SendReq.hIf = hIf;
    314     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
     314    rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
    315315    if (RT_FAILURE(rc))
    316316    {
     
    542542        WaitReq.hIf = hIf;
    543543        WaitReq.cMillies = cMillies - (uint32_t)cElapsedMillies;
    544         int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
     544        int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
    545545        if (rc == VERR_TIMEOUT)
    546546            break;
     
    882882             OpenReq.szNetwork, OpenReq.szTrunk);
    883883    RTStrmFlush(g_pStdOut);
    884     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
     884    rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
    885885    if (RT_SUCCESS(rc))
    886886    {
     
    898898        GetRing3BufferReq.hIf = OpenReq.hIf;
    899899        GetRing3BufferReq.pRing3Buf = NULL;
    900         rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
     900        rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
    901901        if (RT_SUCCESS(rc))
    902902        {
     
    913913                PromiscReq.hIf          = OpenReq.hIf;
    914914                PromiscReq.fPromiscuous = true;
    915                 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE, 0, &PromiscReq.Hdr);
     915                rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE, 0, &PromiscReq.Hdr);
    916916                if (RT_SUCCESS(rc))
    917917                    RTPrintf("tstIntNet-1: interface in promiscuous mode\n");
     
    928928                ActiveReq.hIf = OpenReq.hIf;
    929929                ActiveReq.fActive = true;
    930                 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
     930                rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
    931931                if (RT_SUCCESS(rc))
    932932                {
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r19255 r19257  
    149149
    150150#ifdef RT_WITH_W64_UNWIND_HACK
    151 DECLASM(int)    supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession);
     151DECLASM(int)    supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession);
    152152DECLASM(int)    supdrvNtWrapVMMR0EntryFast(PFNRT pfnVMMR0EntryFast, PVM pVM, unsigned idCpu, unsigned uOperation);
    153153DECLASM(void)   supdrvNtWrapObjDestructor(PFNRT pfnDestruction, void *pvObj, void *pvUser1, void *pvUser2);
     
    13281328                if (RT_LIKELY(pDevExt->pfnVMMR0EntryEx))
    13291329#ifdef RT_WITH_W64_UNWIND_HACK
    1330                     pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In.uOperation, NULL, pReq->u.In.u64Arg, pSession);
     1330                    pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, NULL, pReq->u.In.u64Arg, pSession);
    13311331#else
    1332                     pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In.uOperation, NULL, pReq->u.In.u64Arg, pSession);
     1332                    pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, NULL, pReq->u.In.u64Arg, pSession);
    13331333#endif
    13341334                else
     
    13461346                if (RT_LIKELY(pDevExt->pfnVMMR0EntryEx))
    13471347#ifdef RT_WITH_W64_UNWIND_HACK
    1348                     pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In.uOperation, pVMMReq, pReq->u.In.u64Arg, pSession);
     1348                    pReq->Hdr.rc = supdrvNtWrapVMMR0EntryEx((PFNRT)pDevExt->pfnVMMR0EntryEx, pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, pVMMReq, pReq->u.In.u64Arg, pSession);
    13491349#else
    1350                     pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In.uOperation, pVMMReq, pReq->u.In.u64Arg, pSession);
     1350                    pReq->Hdr.rc = pDevExt->pfnVMMR0EntryEx(pReq->u.In.pVMR0, pReq->u.In.idCpu, pReq->u.In.uOperation, pVMMReq, pReq->u.In.u64Arg, pSession);
    13511351#endif
    13521352                else
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r19255 r19257  
    188188 *            and renaming the related IOCtls too.
    189189 */
    190 #define SUPDRV_IOC_VERSION                              0x000a0009
     190#define SUPDRV_IOC_VERSION                              0x000b0000
    191191
    192192/** SUP_IOCTL_COOKIE. */
     
    527527            /** The VM handle. */
    528528            PVMR0           pVMR0;
     529            /** VCPU id. */
     530            uint32_t        idCpu;
    529531            /** Which operation to execute. */
    530532            uint32_t        uOperation;
    531 #if R0_ARCH_BITS == 64
    532             /** Alignment. */
    533             uint32_t        u32Reserved;
    534 #endif
    535533            /** Argument to use when no request packet is supplied. */
    536534            uint64_t        u64Arg;
  • trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h

    r19255 r19257  
    570570    DECLR0CALLBACKMEMBER(void,      pfnVMMR0EntryFast, (PVM pVM, unsigned idCpu, unsigned uOperation));
    571571    /** VMMR0EntryEx() pointer. */
    572     DECLR0CALLBACKMEMBER(int,       pfnVMMR0EntryEx, (PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
     572    DECLR0CALLBACKMEMBER(int,       pfnVMMR0EntryEx, (PVM pVM, unsigned idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
    573573
    574574    /** Linked list of loaded code. */
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r19255 r19257  
    582582
    583583
    584 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)
     584SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)
    585585{
    586586    /*
     
    609609        Req.Hdr.rc = VERR_INTERNAL_ERROR;
    610610        Req.u.In.pVMR0 = pVMR0;
     611        Req.u.In.idCpu = idCpu;
    611612        Req.u.In.uOperation = uOperation;
    612613        Req.u.In.u64Arg = u64Arg;
     
    629630        pReq->Hdr.rc = VERR_INTERNAL_ERROR;
    630631        pReq->u.In.pVMR0 = pVMR0;
     632        pReq->u.In.idCpu = idCpu;
    631633        pReq->u.In.uOperation = uOperation;
    632634        pReq->u.In.u64Arg = u64Arg;
     
    643645
    644646
    645 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg)
     647SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned idCpu, unsigned uOperation, void *pvArg)
    646648{
    647649    /*
     
    653655                    ("%#x\n", uOperation),
    654656                    VERR_INTERNAL_ERROR);
    655     return SUPCallVMMR0Ex(pVMR0, uOperation, (uintptr_t)pvArg, NULL);
     657    return SUPCallVMMR0Ex(pVMR0, idCpu, uOperation, (uintptr_t)pvArg, NULL);
    656658}
    657659
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp

    r19255 r19257  
    124124                    for (i = cIterations; i > 0; i--)
    125125                    {
    126                         rc = SUPCallVMMR0(pVMR0, VMMR0_DO_SLOW_NOP, NULL);
     126                        rc = SUPCallVMMR0(pVMR0, 0, VMMR0_DO_SLOW_NOP, NULL);
    127127                        if (rc != VINF_SUCCESS)
    128128                        {
     
    174174                        {
    175175                            uint64_t OneStartTick = ASMReadTSC();
    176                             rc = SUPCallVMMR0Ex(pVMR0, VMMR0_DO_SLOW_NOP, 0, NULL);
     176                            rc = SUPCallVMMR0Ex(pVMR0, 0, VMMR0_DO_SLOW_NOP, 0, NULL);
    177177                            uint64_t Ticks = ASMReadTSC() - OneStartTick;
    178178                            if (Ticks < MinTicks)
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm

    r19255 r19257  
    170170
    171171;;
    172 ; @cproto DECLASM(int) supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession);
     172; @cproto DECLASM(int) supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession);
    173173;
    174174; @param    pfnVMMR0EntryEx     rcx
    175175; @param    pVM                 rdx
    176 ; @param    uOperation          r8
    177 ; @param    pReq                r9
    178 ; @param    u64Arg              [rsp + 28h] / [rbp + 30h]
    179 ; @param    pSession            [rsp + 30h] / [rbp + 38h]
     176; @param    idCpu               r8
     177; @param    uOperation          r9
     178; @param    pReq                [rsp + 28h] / [rbp + 30h]
     179; @param    u64Arg              [rsp + 30h] / [rbp + 38h]
     180; @param    pSession            [rsp + 38h] / [rbp + 40h]
    180181;
    181182BEGINPROC supdrvNtWrapVMMR0EntryEx
     
    190191        mov     r11, [rbp + 38h]
    191192        mov     [rsp + 20h], r11
     193        mov     r11, [rbp + 40h]
     194        mov     [rsp + 28h], r11
    192195        call    rax
    193196
  • trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp

    r19255 r19257  
    577577        CloseReq.hIf = m_hIf;
    578578        m_hIf = INTNET_HANDLE_INVALID;
    579         int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_CLOSE, 0, &CloseReq.Hdr);
     579        int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_CLOSE, 0, &CloseReq.Hdr);
    580580        AssertRC(rc);
    581581    }
     
    907907     */
    908908    debugPrint(2, false, "attempting to open/create network \"%s\"...", OpenReq.szNetwork);
    909     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
     909    rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
    910910    if (RT_SUCCESS(rc))
    911911    {
     
    922922        GetRing3BufferReq.hIf = m_hIf;
    923923        GetRing3BufferReq.pRing3Buf = NULL;
    924         rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
     924        rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
    925925        if (RT_SUCCESS(rc))
    926926        {
     
    939939            ActiveReq.hIf = m_hIf;
    940940            ActiveReq.fActive = true;
    941             rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
     941            rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
    942942            if (RT_SUCCESS(rc))
    943943                return 0;
     
    979979        WaitReq.hIf = m_hIf;
    980980        WaitReq.cMillies = 2000; /* 2 secs - the sleep is for some reason uninterruptible... */  /** @todo fix interruptability in SrvIntNet! */
    981         int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
     981        int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
    982982        if (RT_FAILURE(rc))
    983983        {
  • trunk/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp

    r19255 r19257  
    4949    SendReq.pSession     = pSession;
    5050    SendReq.hIf          = hIf;
    51     return SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
     51    return SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VPCU 0 */, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
    5252}
    5353
  • trunk/src/VBox/VMM/HWACCM.cpp

    r19255 r19257  
    459459
    460460    /* Enable VT-x or AMD-V on all host CPUs. */
    461     rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_ENABLE, 0, NULL);
     461    rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_ENABLE, 0, NULL);
    462462    if (RT_FAILURE(rc))
    463463    {
     
    828828            }
    829829
    830             rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
     830            rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
    831831            AssertRC(rc);
    832832            if (rc == VINF_SUCCESS)
     
    936936                pVM->hwaccm.s.fNestedPaging = pVM->hwaccm.s.fAllowNestedPaging;
    937937
    938             rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
     938            rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
    939939            AssertRC(rc);
    940940            if (rc == VINF_SUCCESS)
  • trunk/src/VBox/VMM/PDMDriver.cpp

    r19255 r19257  
    949949    if (    uOperation >= VMMR0_DO_SRV_START
    950950        &&  uOperation <  VMMR0_DO_SRV_END)
    951         rc = SUPCallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, uOperation, 0, (PSUPVMMR0REQHDR)pvArg);
     951        rc = SUPCallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, 0 /* idCpu not relevant */, uOperation, 0, (PSUPVMMR0REQHDR)pvArg);
    952952    else
    953953    {
  • trunk/src/VBox/VMM/VM.cpp

    r19255 r19257  
    511511    CreateVMReq.pVMR3           = NULL;
    512512    CreateVMReq.cCPUs           = cCPUs;
    513     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, VMMR0_DO_GVMM_CREATE_VM, 0, &CreateVMReq.Hdr);
     513    rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VCPU 0 */, VMMR0_DO_GVMM_CREATE_VM, 0, &CreateVMReq.Hdr);
    514514    if (RT_SUCCESS(rc))
    515515    {
     
    656656
    657657        /* Tell GVMM that it can destroy the VM now. */
    658         int rc2 = SUPCallVMMR0Ex(CreateVMReq.pVMR0, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
     658        int rc2 = SUPCallVMMR0Ex(CreateVMReq.pVMR0, 0 /* VCPU 0 */, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
    659659        AssertRC(rc2);
    660660        pUVM->pVM = NULL;
     
    17481748         * Tell GVMM to destroy the VM and free its resources.
    17491749         */
    1750         int rc = SUPCallVMMR0Ex(pUVM->pVM->pVMR0, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
     1750        int rc = SUPCallVMMR0Ex(pUVM->pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
    17511751        AssertRC(rc);
    17521752        pUVM->pVM = NULL;
  • trunk/src/VBox/VMM/VMEmt.cpp

    r19255 r19257  
    732732            //RTLogRelPrintf("u64NanoTS=%RI64 cLoops=%3d sleep %02dms (%7RU64) ", u64NanoTS, cLoops, cMilliSecs, u64NanoTS);
    733733            STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltBlock, c);
    734             rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GVMM_SCHED_HALT, u64GipTime, NULL);
     734            rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, u64GipTime, NULL);
    735735            STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltBlock, c);
    736736            if (rc == VERR_INTERRUPTED)
     
    752752        {
    753753            STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltYield, d);
    754             rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GVMM_SCHED_POLL, false /* don't yield */, NULL);
     754            rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_POLL, false /* don't yield */, NULL);
    755755            STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltYield, d);
    756756        }
     
    790790         * anything needs our attention.
    791791         */
    792         rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GVMM_SCHED_HALT, RTTimeNanoTS() + 1000000000 /* +1s */, NULL);
     792        rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, RTTimeNanoTS() + 1000000000 /* +1s */, NULL);
    793793        if (rc == VERR_INTERRUPTED)
    794794            rc = VINF_SUCCESS;
     
    819819    if (pUVCpu->vm.s.fWait)
    820820    {
    821         int rc = SUPCallVMMR0Ex(pUVCpu->pVM->pVMR0, VMMR0_DO_GVMM_SCHED_WAKE_UP, 0, NULL);
     821        int rc = SUPCallVMMR0Ex(pUVCpu->pVM->pVMR0, pUVCpu->idCpu, VMMR0_DO_GVMM_SCHED_WAKE_UP, 0, NULL);
    822822        AssertRC(rc);
    823823    }
  • trunk/src/VBox/VMM/VMM.cpp

    r19255 r19257  
    463463        rc = VINF_SUCCESS;
    464464#else
    465         rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL);
     465        rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL);
    466466#endif
    467467        if (    pVM->vmm.s.pR0LoggerR3
     
    532532            rc = VINF_SUCCESS;
    533533#else
    534             rc = SUPCallVMMR0(pVM->pVMR0, VMMR0_DO_CALL_HYPERVISOR, NULL);
     534            rc = SUPCallVMMR0(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_CALL_HYPERVISOR, NULL);
    535535#endif
    536536#ifdef LOG_ENABLED
     
    582582        rc = VINF_SUCCESS;
    583583#else
    584         rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_VMMR0_TERM, 0, NULL);
     584        rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_VMMR0_TERM, 0, NULL);
    585585#endif
    586586        if (    pVM->vmm.s.pR0LoggerR3
     
    12911291VMMR3DECL(int) VMMR3CallR0(PVM pVM, uint32_t uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)
    12921292{
     1293    PVMCPU pVCpu = VMMGetCpu(pVM);
     1294    AssertReturn(pVCpu, VERR_VM_THREAD_NOT_EMT);
     1295
    12931296    /*
    12941297     * Call Ring-0 entry with init code.
     
    13001303        rc = VERR_GENERAL_FAILURE;
    13011304#else
    1302         rc = SUPCallVMMR0Ex(pVM->pVMR0, uOperation, u64Arg, pReqHdr);
     1305        rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, uOperation, u64Arg, pReqHdr);
    13031306#endif
    13041307        if (    pVM->vmm.s.pR0LoggerR3
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r19255 r19257  
    691691 * @returns VBox status code.
    692692 * @param   pVM             The VM to operate on.
     693 * @param   idCpu           VMCPU id.
    693694 * @param   enmOperation    Which operation to execute.
    694695 * @param   pReqHdr         This points to a SUPVMMR0REQHDR packet. Optional.
     
    698699 * @remarks Assume called with interrupts _enabled_.
    699700 */
    700 static int vmmR0EntryExWorker(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReqHdr, uint64_t u64Arg, PSUPDRVSESSION pSession)
     701static int vmmR0EntryExWorker(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReqHdr, uint64_t u64Arg, PSUPDRVSESSION pSession)
    701702{
    702703    /*
     
    992993
    993994/**
    994  * Argument for vmmR0EntryExWrapper containing the argument s ofr VMMR0EntryEx.
     995 * Argument for vmmR0EntryExWrapper containing the arguments for VMMR0EntryEx.
    995996 */
    996997typedef struct VMMR0ENTRYEXARGS
    997998{
    998999    PVM                 pVM;
     1000    unsigned            idCpu;
    9991001    VMMR0OPERATION      enmOperation;
    10001002    PSUPVMMR0REQHDR     pReq;
     
    10141016{
    10151017    return vmmR0EntryExWorker(((PVMMR0ENTRYEXARGS)pvArgs)->pVM,
     1018                              ((PVMMR0ENTRYEXARGS)pvArgs)->idCpu,
    10161019                              ((PVMMR0ENTRYEXARGS)pvArgs)->enmOperation,
    10171020                              ((PVMMR0ENTRYEXARGS)pvArgs)->pReq,
     
    10261029 * @returns VBox status code.
    10271030 * @param   pVM             The VM to operate on.
     1031 * @param   idCpu           VMCPU id.
    10281032 * @param   enmOperation    Which operation to execute.
    10291033 * @param   pReq            This points to a SUPVMMR0REQHDR packet. Optional.
     
    10321036 * @remarks Assume called with interrupts _enabled_.
    10331037 */
    1034 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession)
     1038VMMR0DECL(int) VMMR0EntryEx(PVM pVM, unsigned idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession)
    10351039{
    10361040    /*
     
    10601064                VMMR0ENTRYEXARGS Args;
    10611065                Args.pVM = pVM;
     1066                Args.idCpu = idCpu;
    10621067                Args.enmOperation = enmOperation;
    10631068                Args.pReq = pReq;
     
    10711076        }
    10721077    }
    1073     return vmmR0EntryExWorker(pVM, enmOperation, pReq, u64Arg, pSession);
     1078    return vmmR0EntryExWorker(pVM, idCpu, enmOperation, pReq, u64Arg, pSession);
    10741079}
    10751080
  • trunk/src/VBox/VMM/testcase/tstGlobalConfig.cpp

    r19255 r19257  
    107107    {
    108108        Req.pSession = pSession;
    109         rc = SUPCallVMMR0Ex(NIL_RTR0PTR, enmOp, 0, &Req.Hdr);
     109        rc = SUPCallVMMR0Ex(NIL_RTR0PTR, 0 /* VCPU 0 */, enmOp, 0, &Req.Hdr);
    110110        if (RT_SUCCESS(rc))
    111111        {
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