VirtualBox

Changeset 20873 in vbox


Ignore:
Timestamp:
Jun 24, 2009 2:08:38 AM (16 years ago)
Author:
vboxsync
Message:

VMMGCCallHost -> VMMRZCallRing3[NoCpu].

Location:
trunk
Files:
9 edited

Legend:

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

    r20871 r20873  
    371371VMMRCDECL(int)      VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...);
    372372VMMRCDECL(void)     VMMGCGuestToHost(PVM pVM, int rc);
    373 VMMRCDECL(int)      VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);
    374373VMMRCDECL(void)     VMMGCLogFlushIfFull(PVM pVM);
    375374/** @} */
  • trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp

    r20864 r20873  
    169169#endif
    170170    int rc = PDMCritSectEnter(&pHeap->Lock, VERR_SEM_BUSY);
    171 #ifdef IN_RC
     171#if defined(IN_RC) || defined(IN_RING0)
    172172    if (rc == VERR_SEM_BUSY)
    173         rc = VMMGCCallHost(pVM, VMMCALLHOST_MMHYPER_LOCK, 0);
    174 #elif defined(IN_RING0)
    175     if (rc == VERR_SEM_BUSY)
    176         rc = VMMR0CallHost(pVM, VMMCALLHOST_MMHYPER_LOCK, 0);
     173        rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_MMHYPER_LOCK, 0);
    177174#endif
    178175    AssertRC(rc);
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r20654 r20873  
    259259        Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR));
    260260        /* We don't acquire the PDM lock here as we're just reading information. Doing so causes massive
    261          * contention as this function is called very often by each and every VCPU. 
     261         * contention as this function is called very often by each and every VCPU.
    262262         */
    263263        *pu8TPR = pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu);
     
    328328    int rc = PDMCritSectEnter(&pVM->pdm.s.CritSect, VERR_GENERAL_FAILURE);
    329329    if (rc == VERR_GENERAL_FAILURE)
    330     {
    331 # ifdef IN_RC
    332         rc = VMMGCCallHost(pVM, VMMCALLHOST_PDM_LOCK, 0);
    333 # else
    334         rc = VMMR0CallHost(pVM, VMMCALLHOST_PDM_LOCK, 0);
    335 # endif
    336     }
     330        rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PDM_LOCK, 0);
    337331#endif
    338332    AssertRC(rc);
  • trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp

    r19785 r20873  
    180180    PVM pVM = pQueue->CTX_SUFF(pVM);
    181181
    182 #ifdef IN_RC
    183     Assert(pQueue->pVMRC);
     182#if defined(IN_RC) || defined(IN_RING0)
     183    Assert(pQueue->CTX_SUFF(pVM));
    184184    pVM->pdm.s.CTX_SUFF(pQueueFlush) = pQueue;
    185     VMMGCCallHost(pVM, VMMCALLHOST_PDM_QUEUE_FLUSH, (uintptr_t)pQueue);
    186 
    187 #elif defined(IN_RING0)
    188     Assert(pQueue->pVMR0);
    189     pVM->pdm.s.CTX_SUFF(pQueueFlush) = pQueue;
    190     VMMR0CallHost(pVM, VMMCALLHOST_PDM_QUEUE_FLUSH, (uintptr_t)pQueue);
     185    VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PDM_QUEUE_FLUSH, (uintptr_t)pQueue);
    191186
    192187#else /* IN_RING3: */
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r20795 r20873  
    20772077{
    20782078    int rc = PDMCritSectEnter(&pVM->pgm.s.CritSect, VERR_SEM_BUSY);
    2079 #ifdef IN_RC
     2079#if defined(IN_RC) || defined(IN_RING0)
    20802080    if (rc == VERR_SEM_BUSY)
    2081         rc = VMMGCCallHost(pVM, VMMCALLHOST_PGM_LOCK, 0);
    2082 #elif defined(IN_RING0)
    2083     if (rc == VERR_SEM_BUSY)
    2084         rc = VMMR0CallHost(pVM, VMMCALLHOST_PGM_LOCK, 0);
     2081        rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PGM_LOCK, 0);
    20852082#endif
    20862083    AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc));
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r20770 r20873  
    271271#ifdef IN_RING3
    272272            int rc = PGMR3PhysAllocateHandyPages(pVM);
    273 #elif defined(IN_RING0)
    274             int rc = VMMR0CallHost(pVM, VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES, 0);
    275273#else
    276             int rc = VMMGCCallHost(pVM, VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES, 0);
     274            int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES, 0);
    277275#endif
    278276            if (RT_UNLIKELY(rc != VINF_SUCCESS))
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r20773 r20873  
    40094009        int rc = PGMR3PoolGrow(pVM);
    40104010#else
    4011         int rc = CTXALLMID(VMM, CallHost)(pVM, VMMCALLHOST_PGM_POOL_GROW, 0);
     4011        int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PGM_POOL_GROW, 0);
    40124012#endif
    40134013        if (RT_FAILURE(rc))
  • trunk/src/VBox/VMM/VMMAll/VMAll.cpp

    r19300 r20873  
    9696     */
    9797    vmSetErrorCopy(pVM, rc, RT_SRC_POS_ARGS, pszFormat, args);
    98 
    99 # ifdef IN_RC
    100     VMMGCCallHost(pVM, VMMCALLHOST_VM_SET_ERROR, 0);
    101 # elif defined(IN_RING0)
    102     VMMR0CallHost(pVM, VMMCALLHOST_VM_SET_ERROR, 0);
    103 # else
    104 # endif
     98    VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VM_SET_ERROR, 0);
    10599#endif
    106100    return rc;
     
    287281    vmSetRuntimeErrorCopy(pVM, fFlags, pszErrorId, pszFormat, va);
    288282
    289 # ifdef IN_RC
    290     int rc = VMMGCCallHost(pVM, VMMCALLHOST_VM_SET_RUNTIME_ERROR, 0);
    291 # else
    292     int rc = VMMR0CallHost(pVM, VMMCALLHOST_VM_SET_RUNTIME_ERROR, 0);
    293 # endif
     283    int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VM_SET_RUNTIME_ERROR, 0);
    294284#endif
    295285
  • trunk/src/VBox/VMM/VMMGC/VMMGC.cpp

    r20871 r20873  
    176176    PVM pVM = &g_VM;
    177177    NOREF(pLogger);
    178     return VMMGCCallHost(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0);
     178    if (pVM->vmm.s.fRCLoggerFlushingDisabled)
     179        return VINF_SUCCESS; /* fail quietly. */
     180    return VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0);
    179181}
    180182
     
    192194        if (pVM->vmm.s.fRCLoggerFlushingDisabled)
    193195            return; /* fail quietly. */
    194         VMMGCCallHost(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0);
     196        VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0);
    195197    }
    196198}
     
    206208{
    207209    pVM->vmm.s.pfnGuestToHostRC(rc);
    208 }
    209 
    210 
    211 /**
    212  * Calls the ring-3 host code.
    213  *
    214  * @returns VBox status code of the ring-3 call.
    215  * @param   pVM             The VM handle.
    216  * @param   enmOperation    The operation.
    217  * @param   uArg            The argument to the operation.
    218  *
    219  * @deprecated Use VMMRZCallRing3.
    220  */
    221 VMMRCDECL(int) VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg)
    222 {
    223     return VMMRZCallRing3(pVM, VMMGetCpu0(pVM), enmOperation, uArg);
    224210}
    225211
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