VirtualBox

Changeset 13858 in vbox


Ignore:
Timestamp:
Nov 5, 2008 1:45:41 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38855
Message:

Pass the VMCPU id to the ring 0 callbacks.

Location:
trunk
Files:
25 edited

Legend:

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

    r13832 r13858  
    172172VMMR3DECL(int)      EMR3TermCPU(PVM pVM);
    173173VMMR3DECL(DECLNORETURN(void)) EMR3FatalError(PVM pVM, int rc);
    174 VMMR3DECL(int)      EMR3ExecuteVM(PVM pVM);
     174VMMR3DECL(int)      EMR3ExecuteVM(PVM pVM, RTCPUID idCpu);
    175175VMMR3DECL(int)      EMR3CheckRawForcedActions(PVM pVM);
    176176VMMR3DECL(int)      EMR3Interpret(PVM pVM);
  • trunk/include/VBox/sup.h

    r13458 r13858  
    441441 * @param   pVMR0       The ring-0 VM handle.
    442442 * @param   uOperation  The operation; only the SUP_VMMR0_DO_* ones are valid.
    443  */
    444 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation);
     443 * @param   idCPU       VMCPU id.
     444 */
     445SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, unsigned idCPU);
    445446
    446447/**
  • trunk/include/VBox/uvm.h

    r13796 r13858  
    4444    PUVM                            pUVM;
    4545    /** The virtual CPU ID.  */
    46     RTCPUID                         idCPU;
     46    RTCPUID                         idCpu;
    4747
    4848    /** The VM internal data. */
  • trunk/include/VBox/vmm.h

    r13832 r13858  
    135135VMMR3DECL(int)      VMMR3DisableSwitcher(PVM pVM);
    136136VMMR3DECL(int)      VMMR3RawRunGC(PVM pVM);
    137 VMMR3DECL(int)      VMMR3HwAccRunGC(PVM pVM);
     137VMMR3DECL(int)      VMMR3HwAccRunGC(PVM pVM, RTCPUID idCpu);
    138138VMMR3DECL(int)      VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...);
    139139VMMR3DECL(int)      VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args);
     
    277277
    278278VMMR0DECL(int)      VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg);
    279 VMMR0DECL(void)     VMMR0EntryFast(PVM pVM, VMMR0OPERATION enmOperation);
     279VMMR0DECL(void)     VMMR0EntryFast(PVM pVM, unsigned idCPU, VMMR0OPERATION enmOperation);
    280280VMMR0DECL(int)      VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);
    281281VMMR0DECL(int)      VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r13839 r13858  
    155155#ifdef RT_WITH_W64_UNWIND_HACK
    156156DECLASM(int)    supdrvNtWrapVMMR0EntryEx(PFNRT pfnVMMR0EntryEx, PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession);
    157 DECLASM(int)    supdrvNtWrapVMMR0EntryFast(PFNRT pfnVMMR0EntryFast, PVM pVM, unsigned uOperation);
     157DECLASM(int)    supdrvNtWrapVMMR0EntryFast(PFNRT pfnVMMR0EntryFast, PVM pVM, unsigned idCPU, unsigned uOperation);
    158158DECLASM(void)   supdrvNtWrapObjDestructor(PFNRT pfnDestruction, void *pvObj, void *pvUser1, void *pvUser2);
    159159DECLASM(void *) supdrvNtWrapQueryFactoryInterface(PFNRT pfnQueryFactoryInterface, struct SUPDRVFACTORY const *pSupDrvFactory, PSUPDRVSESSION pSession, const char *pszInterfaceUuid);
     
    861861 * @returns VBox status code that should be passed down to ring-3 unchanged.
    862862 * @param   uIOCtl      Function number.
     863 * @param   idCPU       VMCPU id.
    863864 * @param   pDevExt     Device extention.
    864865 * @param   pSession    Session data.
    865866 */
    866 int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession)
     867int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, unsigned idCPU, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession)
    867868{
    868869    /*
     
    875876            case SUP_IOCTL_FAST_DO_RAW_RUN:
    876877#ifdef RT_WITH_W64_UNWIND_HACK
    877                 supdrvNtWrapVMMR0EntryFast((PFNRT)pDevExt->pfnVMMR0EntryFast, pSession->pVM, SUP_VMMR0_DO_RAW_RUN);
     878                supdrvNtWrapVMMR0EntryFast((PFNRT)pDevExt->pfnVMMR0EntryFast, pSession->pVM, idCPU, SUP_VMMR0_DO_RAW_RUN);
    878879#else
    879                 pDevExt->pfnVMMR0EntryFast(pSession->pVM, SUP_VMMR0_DO_RAW_RUN);
     880                pDevExt->pfnVMMR0EntryFast(pSession->pVM, idCPU, SUP_VMMR0_DO_RAW_RUN);
    880881#endif
    881882                break;
    882883            case SUP_IOCTL_FAST_DO_HWACC_RUN:
    883884#ifdef RT_WITH_W64_UNWIND_HACK
    884                 supdrvNtWrapVMMR0EntryFast((PFNRT)pDevExt->pfnVMMR0EntryFast, pSession->pVM, SUP_VMMR0_DO_HWACC_RUN);
     885                supdrvNtWrapVMMR0EntryFast((PFNRT)pDevExt->pfnVMMR0EntryFast, pSession->pVM, idCPU, SUP_VMMR0_DO_HWACC_RUN);
    885886#else
    886                 pDevExt->pfnVMMR0EntryFast(pSession->pVM, SUP_VMMR0_DO_HWACC_RUN);
     887                pDevExt->pfnVMMR0EntryFast(pSession->pVM, idCPU, SUP_VMMR0_DO_HWACC_RUN);
    887888#endif
    888889                break;
    889890            case SUP_IOCTL_FAST_DO_NOP:
    890891#ifdef RT_WITH_W64_UNWIND_HACK
    891                 supdrvNtWrapVMMR0EntryFast((PFNRT)pDevExt->pfnVMMR0EntryFast, pSession->pVM, SUP_VMMR0_DO_NOP);
     892                supdrvNtWrapVMMR0EntryFast((PFNRT)pDevExt->pfnVMMR0EntryFast, pSession->pVM, idCPU, SUP_VMMR0_DO_NOP);
    892893#else
    893                 pDevExt->pfnVMMR0EntryFast(pSession->pVM, SUP_VMMR0_DO_NOP);
     894                pDevExt->pfnVMMR0EntryFast(pSession->pVM, idCPU, SUP_VMMR0_DO_NOP);
    894895#endif
    895896                break;
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r13479 r13858  
    182182 * The upper 16-bit is the major version, the the lower the minor version.
    183183 * When incompatible changes are made, the upper major number has to be changed. */
    184 #define SUPDRV_IOC_VERSION                              0x00090001
     184#define SUPDRV_IOC_VERSION                              0x000A0000
    185185
    186186/** SUP_IOCTL_COOKIE. */
  • trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h

    r13494 r13858  
    647647    DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryInt, (PVM pVM, unsigned uOperation, void *pvArg));
    648648    /** VMMR0EntryFast() pointer. */
    649     DECLR0CALLBACKMEMBER(void, pfnVMMR0EntryFast, (PVM pVM, unsigned uOperation));
     649    DECLR0CALLBACKMEMBER(void, pfnVMMR0EntryFast, (PVM pVM, unsigned idCPU, unsigned uOperation));
    650650    /** VMMR0EntryEx() pointer. */
    651651    DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
     
    703703*******************************************************************************/
    704704int  VBOXCALL   supdrvIOCtl(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPREQHDR pReqHdr);
    705 int  VBOXCALL   supdrvIOCtlFast(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
     705int  VBOXCALL   supdrvIOCtlFast(uintptr_t uIOCtl, unsigned idCPU, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
    706706int  VBOXCALL   supdrvIDC(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVIDCREQHDR pReqHdr);
    707707int  VBOXCALL   supdrvInitDevExt(PSUPDRVDEVEXT pDevExt);
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r13837 r13858  
    565565
    566566
    567 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation)
     567SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, unsigned idCPU)
    568568{
    569569    if (RT_LIKELY(uOperation == SUP_VMMR0_DO_RAW_RUN))
    570         return suplibOsIOCtlFast(&g_supLibData, SUP_IOCTL_FAST_DO_RAW_RUN);
     570        return suplibOsIOCtlFast(&g_supLibData, SUP_IOCTL_FAST_DO_RAW_RUN, idCPU);
    571571    if (RT_LIKELY(uOperation == SUP_VMMR0_DO_HWACC_RUN))
    572         return suplibOsIOCtlFast(&g_supLibData, SUP_IOCTL_FAST_DO_HWACC_RUN);
     572        return suplibOsIOCtlFast(&g_supLibData, SUP_IOCTL_FAST_DO_HWACC_RUN, idCPU);
    573573    if (RT_LIKELY(uOperation == SUP_VMMR0_DO_NOP))
    574         return suplibOsIOCtlFast(&g_supLibData, SUP_IOCTL_FAST_DO_NOP);
     574        return suplibOsIOCtlFast(&g_supLibData, SUP_IOCTL_FAST_DO_NOP, idCPU);
    575575
    576576    AssertMsgFailed(("%#x\n", uOperation));
  • trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h

    r13458 r13858  
    251251int     suplibOsTerm(PSUPLIBDATA pThis);
    252252int     suplibOsIOCtl(PSUPLIBDATA pThis, uintptr_t uFunction, void *pvReq, size_t cbReq);
    253 int     suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction);
     253int     suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCPU);
    254254int     suplibOsPageAlloc(PSUPLIBDATA pThis, size_t cPages, void **ppvPages);
    255255int     suplibOsPageFree(PSUPLIBDATA pThis, void *pvPages, size_t cPages);
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp

    r13837 r13858  
    271271
    272272
    273 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction)
     273int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
    274274{
    275275    int rc = ioctl(pThis->hDevice, uFunction, NULL);
  • trunk/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp

    r13837 r13858  
    167167
    168168
    169 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction)
     169int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
    170170{
    171171    int rc = ioctl(pThis->hDevice, uFunction, NULL);
  • trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp

    r13837 r13858  
    202202
    203203
    204 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction)
     204int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
    205205{
    206206    int rc = ioctl(pThis->hDevice, uFunction, NULL);
  • trunk/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp

    r13837 r13858  
    153153
    154154
    155 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction)
     155int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
    156156{
    157157    int32_t rcRet = VERR_INTERNAL_ERROR;
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp

    r13837 r13858  
    160160
    161161
    162 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction)
     162int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
    163163{
    164164    int rc = ioctl(pThis->hDevice, uFunction, NULL);
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp

    r13837 r13858  
    144144                        {
    145145                            uint64_t OneStartTick = ASMReadTSC();
    146                             rc = SUPCallVMMR0Fast(pVMR0, VMMR0_DO_NOP);
     146                            rc = SUPCallVMMR0Fast(pVMR0, VMMR0_DO_NOP, 0);
    147147                            uint64_t Ticks = ASMReadTSC() - OneStartTick;
    148148                            if (Ticks < MinTicks)
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r13529 r13858  
    326326        KIRQL oldIrql;
    327327        KeRaiseIrql(DISPATCH_LEVEL, &oldIrql);
    328         int rc = supdrvIOCtlFast(ulCmd, pDevExt, pSession);
     328        int rc = supdrvIOCtlFast(ulCmd, (unsigned)pIrp->UserBuffer /* VMCPU id */, pDevExt, pSession);
    329329        KeLowerIrql(oldIrql);
    330330
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm

    r13536 r13858  
    193193
    194194;;
    195 ; @cproto DECLASM(int)    supdrvNtWrapVMMR0EntryFast(PFNRT pfnVMMR0EntryFast, PVM pVM, unsigned uOperation);
     195; @cproto DECLASM(int)    supdrvNtWrapVMMR0EntryFast(PFNRT pfnVMMR0EntryFast, PVM pVM, unsigned idCPU, unsigned uOperation);
    196196;
    197197; @param    pfnVMMR0EntryFast   rcx
    198198; @param    pVM                 rdx
    199 ; @param    uOperation          r8
     199; @param    idCPU               r8
     200; @param    uOperation          r9
    200201;
    201202BEGINPROC supdrvNtWrapVMMR0EntryFast
     
    206207        mov     rcx, rdx
    207208        mov     rdx, r8
     209        mov     r8, r9
    208210        call    rax
    209211
  • trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp

    r13835 r13858  
    504504
    505505
    506 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction)
     506int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
    507507{
    508508    /*
     
    510510     */
    511511    DWORD cbReturned = 0;
    512     if (DeviceIoControl((HANDLE)pThis->hDevice, uFunction, NULL, 0, NULL, 0, &cbReturned, NULL))
     512    if (DeviceIoControl((HANDLE)pThis->hDevice, uFunction, NULL, 0, (LPVOID)idCpu, 0, &cbReturned, NULL))
    513513        return VINF_SUCCESS;
    514514    return suplibConvertWin32Err(GetLastError());
  • trunk/src/VBox/VMM/EM.cpp

    r13826 r13858  
    10581058 * @returns VBox status code.
    10591059 * @param   pVM     The VM handle.
    1060  */
    1061 static int emR3HwAccStep(PVM pVM)
     1060 * @param   idCpu   VMCPU id.
     1061 */
     1062static int emR3HwAccStep(PVM pVM, RTCPUID idCpu)
    10621063{
    10631064    Assert(pVM->em.s.enmState == EMSTATE_DEBUG_GUEST_HWACC);
     
    10871088    do
    10881089    {
    1089         rc = VMMR3HwAccRunGC(pVM);
     1090        rc = VMMR3HwAccRunGC(pVM, idCpu);
    10901091    } while (   rc == VINF_SUCCESS
    10911092             || rc == VINF_EM_RAW_INTERRUPT);
     
    11271128
    11281129
    1129 void emR3SingleStepExecHwAcc(PVM pVM, uint32_t cIterations)
     1130void emR3SingleStepExecHwAcc(PVM pVM, RTCPUID idCpu, uint32_t cIterations)
    11301131{
    11311132    EMSTATE  enmOldState = pVM->em.s.enmState;
     
    11381139        DBGFR3PrgStep(pVM);
    11391140        DBGFR3DisasInstrCurrentLog(pVM, "RSS: ");
    1140         emR3HwAccStep(pVM);
     1141        emR3HwAccStep(pVM, idCpu);
    11411142    }
    11421143    Log(("Single step END:\n"));
     
    27612762 *
    27622763 * @param   pVM         VM handle.
     2764 * @param   idCpu       VMCPU id.
    27632765 * @param   pfFFDone    Where to store an indicator telling whether or not
    27642766 *                      FFs were done before returning.
    27652767 */
    2766 static int emR3HwAccExecute(PVM pVM, bool *pfFFDone)
     2768static int emR3HwAccExecute(PVM pVM, RTCPUID idCpu, bool *pfFFDone)
    27672769{
    27682770    int      rc = VERR_INTERNAL_ERROR;
    27692771    PCPUMCTX pCtx = pVM->em.s.pCtx;
    27702772
    2771     LogFlow(("emR3HwAccExecute: (cs:eip=%04x:%RGv)\n", pCtx->cs, (RTGCPTR)pCtx->rip));
     2773    LogFlow(("emR3HwAccExecute%d: (cs:eip=%04x:%RGv)\n", idCpu, pCtx->cs, (RTGCPTR)pCtx->rip));
    27722774    *pfFFDone = false;
    27732775
     
    28182820        STAM_PROFILE_START(&pVM->em.s.StatHwAccExec, x);
    28192821        VMMR3Unlock(pVM);
    2820         rc = VMMR3HwAccRunGC(pVM);
     2822        rc = VMMR3HwAccRunGC(pVM, idCpu);
    28212823        VMMR3Lock(pVM);
    28222824        STAM_PROFILE_STOP(&pVM->em.s.StatHwAccExec, x);
     
    32973299 * @returns VBox status code, informational status codes may indicate failure.
    32983300 * @param   pVM         The VM to operate on.
    3299  */
    3300 VMMR3DECL(int) EMR3ExecuteVM(PVM pVM)
     3301 * @param   idCpu       VMCPU id.
     3302 */
     3303VMMR3DECL(int) EMR3ExecuteVM(PVM pVM, RTCPUID idCpu)
    33013304{
    33023305    LogFlow(("EMR3ExecuteVM: pVM=%p enmVMState=%d  enmState=%d (%s) fForceRAW=%d\n", pVM, pVM->enmVMState,
     
    35443547                 */
    35453548                case EMSTATE_HWACC:
    3546                     rc = emR3HwAccExecute(pVM, &fFFDone);
     3549                    rc = emR3HwAccExecute(pVM, idCpu, &fFFDone);
    35473550                    break;
    35483551
  • trunk/src/VBox/VMM/VM.cpp

    r13823 r13858  
    401401    {
    402402        pUVM->aCpus[i].pUVM  = pUVM;
    403         pUVM->aCpus[i].idCPU = i;
     403        pUVM->aCpus[i].idCpu = i;
    404404    }
    405405
     
    31903190
    31913191    AssertMsg(pUVMCPU, ("RTTlsGet %d failed!\n", pVM->pUVM->vm.s.idxTLS));
    3192     return pUVMCPU->idCPU;
     3192    return pUVMCPU->idCpu;
    31933193}
    31943194
  • trunk/src/VBox/VMM/VMEmt.cpp

    r13818 r13858  
    5656    PUVMCPU pUVMCPU = (PUVMCPU)pvArgs;
    5757    PUVM    pUVM    = pUVMCPU->pUVM;
    58     RTCPUID idCPU   = pUVMCPU->idCPU;
     58    RTCPUID idCpu   = pUVMCPU->idCpu;
    5959    int     rc;
    6060
     
    184184        {
    185185            PVM pVM = pUVM->pVM;
    186             rc = EMR3ExecuteVM(pVM);
     186            rc = EMR3ExecuteVM(pVM, idCpu);
    187187            Log(("vmR3EmulationThread: EMR3ExecuteVM() -> rc=%Rrc, enmVMState=%d\n", rc, pVM->enmVMState));
    188188            if (   EMGetState(pVM) == EMSTATE_GURU_MEDITATION
  • trunk/src/VBox/VMM/VMM.cpp

    r13823 r13858  
    10701070            rc = VERR_GENERAL_FAILURE;
    10711071#else
    1072             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     1072            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    10731073            if (RT_LIKELY(rc == VINF_SUCCESS))
    10741074                rc = pVM->vmm.s.iLastGZRc;
     
    11071107 *
    11081108 * @param   pVM         VM handle.
    1109  */
    1110 VMMR3DECL(int) VMMR3HwAccRunGC(PVM pVM)
     1109 * @param   idCpu       VMCPU id.
     1110 */
     1111VMMR3DECL(int) VMMR3HwAccRunGC(PVM pVM, RTCPUID idCpu)
    11111112{
    11121113    Log2(("VMMR3HwAccRunGC: (cs:eip=%04x:%08x)\n", CPUMGetGuestCS(pVM), CPUMGetGuestEIP(pVM)));
     
    11201121            rc = VERR_GENERAL_FAILURE;
    11211122#else
    1122             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN);
     1123            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, idCpu);
    11231124            if (RT_LIKELY(rc == VINF_SUCCESS))
    11241125                rc = pVM->vmm.s.iLastGZRc;
     
    12041205            rc = VERR_GENERAL_FAILURE;
    12051206#else
    1206             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     1207            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    12071208            if (RT_LIKELY(rc == VINF_SUCCESS))
    12081209                rc = pVM->vmm.s.iLastGZRc;
     
    12601261            rc = VERR_GENERAL_FAILURE;
    12611262#else
    1262             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     1263            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    12631264            if (RT_LIKELY(rc == VINF_SUCCESS))
    12641265                rc = pVM->vmm.s.iLastGZRc;
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r13818 r13858  
    566566 * @param   pVM             The VM to operate on.
    567567 *                          The return code is stored in pVM->vmm.s.iLastGZRc.
     568 * @param   idCPU           VMCPU id.
    568569 * @param   enmOperation    Which operation to execute.
    569570 * @remarks Assume called with interrupts _enabled_.
    570571 */
    571 VMMR0DECL(void) VMMR0EntryFast(PVM pVM, VMMR0OPERATION enmOperation)
     572VMMR0DECL(void) VMMR0EntryFast(PVM pVM, unsigned idCPU, VMMR0OPERATION enmOperation)
    572573{
    573574    switch (enmOperation)
     
    620621
    621622            STAM_COUNTER_INC(&pVM->vmm.s.StatRunRC);
     623
     624            if (idCPU >= pVM->cCPUs)
     625            {
     626                pVM->vmm.s.iLastGZRc = VERR_INVALID_PARAMETER;
     627                return;
     628            }
    622629
    623630#ifndef RT_OS_WINDOWS /** @todo check other hosts */
  • trunk/src/VBox/VMM/VMMTests.cpp

    r13830 r13858  
    7070    CPUMPushHyper(pVM, RCPtrEP);                /* what to call */
    7171    CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    72     rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     72    rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    7373    if (RT_LIKELY(rc == VINF_SUCCESS))
    7474        rc = pVM->vmm.s.iLastGZRc;
     
    107107    CPUMPushHyper(pVM, RCPtrEP);                /* what to call */
    108108    CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    109     rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     109    rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    110110    if (RT_LIKELY(rc == VINF_SUCCESS))
    111111        rc = pVM->vmm.s.iLastGZRc;
     
    352352        do
    353353        {
    354             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     354            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    355355            if (RT_LIKELY(rc == VINF_SUCCESS))
    356356                rc = pVM->vmm.s.iLastGZRc;
     
    405405
    406406            uint64_t TickThisStart = ASMReadTSC();
    407             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     407            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    408408            if (RT_LIKELY(rc == VINF_SUCCESS))
    409409                rc = pVM->vmm.s.iLastGZRc;
     
    542542
    543543            uint64_t TickThisStart = ASMReadTSC();
    544             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN);
     544            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, 0);
    545545            uint64_t TickThisElapsed = ASMReadTSC() - TickThisStart;
    546546            if (RT_FAILURE(rc))
  • trunk/src/VBox/VMM/VMReq.cpp

    r13818 r13858  
    629629        {
    630630            if (   !pUVMCPU
    631                 ||  pUVMCPU->idCPU != i)
     631                ||  pUVMCPU->idCpu != i)
    632632            {
    633633                /*
     
    671671    else
    672672    if (    pReq->enmDest  != VMREQDEST_ANY  /* for a specific VMCPU? */
    673         &&  pUVMCPU->idCPU != (unsigned)pReq->enmDest)
     673        &&  pUVMCPU->idCpu != (unsigned)pReq->enmDest)
    674674    {
    675675        RTCPUID  idTarget = (RTCPUID)pReq->enmDest;
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