VirtualBox

Ignore:
Timestamp:
Apr 29, 2009 9:56:19 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46655
Message:

SUPCallVMMR0(Ex) arguments must include the VCPU id.
Note: support driver major version change!

Location:
trunk/src/VBox/HostDrivers/Support
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r18850 r19252  
    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

    r18191 r19252  
    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

    r18479 r19252  
    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

    r18761 r19252  
    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

    r14831 r19252  
    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

    r15838 r19252  
    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
Note: See TracChangeset for help on using the changeset viewer.

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