VirtualBox

Changeset 21175 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jul 2, 2009 3:59:21 PM (16 years ago)
Author:
vboxsync
Message:

Don't release the PGM lock when calling the PGM pool handler. (pointless as we'll request the lock again immediately)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r21123 r21175  
    435435                            if (pCur->CTX_SUFF(pfnHandler))
    436436                            {
     437                                PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
    437438#  ifdef IN_RING0
    438439                                PFNPGMR0PHYSHANDLER pfnHandler = pCur->CTX_SUFF(pfnHandler);
     
    440441                                PFNPGMRCPHYSHANDLER pfnHandler = pCur->CTX_SUFF(pfnHandler);
    441442#  endif
     443                                bool  fLeaveLock = (pfnHandler != pPool->CTX_SUFF(pfnAccessHandler));
    442444                                void *pvUser = pCur->CTX_SUFF(pvUser);
    443445
    444446                                STAM_PROFILE_START(&pCur->Stat, h);
    445                                 pgmUnlock(pVM); /* @todo: Not entirely safe. */
     447                                if (fLeaveLock)
     448                                    pgmUnlock(pVM); /* @todo: Not entirely safe. */
     449
    446450                                rc = pfnHandler(pVM, uErr, pRegFrame, pvFault, GCPhysFault, pvUser);
    447                                 pgmLock(pVM);
     451                                if (fLeaveLock)
     452                                    pgmLock(pVM);
    448453#  ifdef VBOX_WITH_STATISTICS
    449454                                pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhysFault);
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