VirtualBox

Changeset 90991 in vbox for trunk/src


Ignore:
Timestamp:
Aug 30, 2021 9:49:20 AM (3 years ago)
Author:
vboxsync
Message:

VMM: Eliminated VMMCALLRING3_MMHYPER_LOCK. bugref:6695

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp

    r90346 r90991  
    166166    Assert(PDMCritSectIsInitialized(&pHeap->Lock));
    167167#endif
    168     int rc = PDMCritSectEnter(pVM, &pHeap->Lock, VERR_SEM_BUSY);
    169 #ifdef IN_RING0
    170     if (rc == VERR_SEM_BUSY)
    171         rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_MMHYPER_LOCK, 0);
    172 #endif
    173     AssertRC(rc);
     168    int rc = PDMCritSectEnter(pVM, &pHeap->Lock, VINF_SUCCESS);
     169    PDM_CRITSECT_RELEASE_ASSERT_RC(pVM, &pHeap->Lock, rc);
    174170    return rc;
    175171}
     
    934930VMMDECL(int) MMHyperFree(PVMCC pVM, void *pv)
    935931{
    936     int rc;
    937 
    938     rc = mmHyperLock(pVM);
     932    int rc = mmHyperLock(pVM);
    939933    AssertRCReturn(rc, rc);
    940934
     
    12181212{
    12191213#ifdef MMHYPER_HEAP_STRICT
    1220     int rc;
    1221 
    1222     rc = mmHyperLock(pVM);
     1214    int rc = mmHyperLock(pVM);
    12231215    AssertRC(rc);
    12241216    mmHyperHeapCheck(pVM->mm.s.CTX_SUFF(pHyperHeap));
  • trunk/src/VBox/VMM/VMMR3/MMHyper.cpp

    r90348 r90991  
    411411    return false;
    412412}
    413 #endif /* !PGM_WITHOUT_MAPPINGS */
    414 
    415 
    416 /**
    417  * Service a VMMCALLRING3_MMHYPER_LOCK call.
    418  *
    419  * @returns VBox status code.
    420  * @param   pVM     The cross context VM structure.
    421  */
    422 VMMR3DECL(int) MMR3LockCall(PVM pVM)
    423 {
    424     PMMHYPERHEAP pHeap = pVM->mm.s.CTX_SUFF(pHyperHeap);
    425 
    426     int rc = PDMR3CritSectEnterEx(pVM, &pHeap->Lock, true /* fHostCall */);
    427     AssertRC(rc);
    428     return rc;
    429 }
    430 
    431 
    432 #ifndef PGM_WITHOUT_MAPPINGS
     413
    433414
    434415/**
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r90982 r90991  
    25502550
    25512551        /*
    2552          * Acquire the MM hypervisor heap lock.
    2553          */
    2554         case VMMCALLRING3_MMHYPER_LOCK:
    2555         {
    2556             pVCpu->vmm.s.rcCallRing3 = MMR3LockCall(pVM);
    2557             break;
    2558         }
    2559 
    2560         /*
    25612552         * Set the VM error message.
    25622553         */
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