VirtualBox

Changeset 19806 in vbox


Ignore:
Timestamp:
May 19, 2009 8:43:18 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
47451
Message:

More locking changes

File:
1 edited

Legend:

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

    r18988 r19806  
    168168            rc = VINF_PGM_GCPHYS_ALIASED;
    169169        pVM->pgm.s.fPhysCacheFlushPending = true;
     170        pgmUnlock(pVM);
    170171        HWACCMFlushTLB(pVM);
    171172#ifndef IN_RING3
     
    174175        REMR3NotifyHandlerPhysicalRegister(pVM, enmType, GCPhys, GCPhysLast - GCPhys + 1, !!pfnHandlerR3);
    175176#endif
    176         pgmUnlock(pVM);
    177177        if (rc != VINF_SUCCESS)
    178178            Log(("PGMHandlerPhysicalRegisterEx: returns %Rrc (%RGp-%RGp)\n", rc, GCPhys, GCPhysLast));
     
    268268         * Clear the page bits and notify the REM about this change.
    269269         */
    270         HWACCMFlushTLB(pVM);
    271270        pgmHandlerPhysicalResetRamFlags(pVM, pCur);
    272271        pgmHandlerPhysicalDeregisterNotifyREM(pVM, pCur);
    273272        pgmUnlock(pVM);
     273        HWACCMFlushTLB(pVM);
    274274        MMHyperFree(pVM, pCur);
    275275        return VINF_SUCCESS;
     
    552552                                                     pCur->Core.KeyLast - GCPhys + 1, !!pCur->pfnHandlerR3, fRestoreAsRAM);
    553553#endif
     554                    pgmUnlock(pVM);
    554555                    HWACCMFlushTLB(pVM);
    555                     pgmUnlock(pVM);
    556556                    Log(("PGMHandlerPhysicalModify: GCPhysCurrent=%RGp -> GCPhys=%RGp GCPhysLast=%RGp\n",
    557557                         GCPhysCurrent, GCPhys, GCPhysLast));
     
    11361136    Assert(ppVirt);
    11371137
     1138    pgmLock(pVM);
    11381139    PPGMPHYS2VIRTHANDLER pCur;
    11391140    pCur = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers, GCPhys);
     
    11411142    {
    11421143        /* found a match! */
     1144        *ppVirt = (PPGMVIRTHANDLER)((uintptr_t)pCur + pCur->offVirtHandler);
     1145        *piPage = pCur - &(*ppVirt)->aPhysToVirt[0];
     1146        pgmUnlock(pVM);
     1147
    11431148#ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL
    11441149        AssertRelease(pCur->offNextAlias & PGMPHYS2VIRTHANDLER_IS_HEAD);
    11451150#endif
    1146         *ppVirt = (PPGMVIRTHANDLER)((uintptr_t)pCur + pCur->offVirtHandler);
    1147         *piPage = pCur - &(*ppVirt)->aPhysToVirt[0];
    1148 
    11491151        LogFlow(("PHYS2VIRT: found match for %RGp -> %RGv *piPage=%#x\n", GCPhys, (*ppVirt)->Core.Key, *piPage));
    11501152        STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,VirtHandlerSearchByPhys), a);
     
    11521154    }
    11531155
     1156    pgmUnlock(pVM);
    11541157    *ppVirt = NULL;
    11551158    STAM_PROFILE_STOP(&pVM->pgm.s.CTX_MID_Z(Stat,VirtHandlerSearchByPhys), a);
     
    12221225    PVM             pVM = (PVM)pvUser;
    12231226
     1227    Assert(PGMIsLockOwner(pVM));
    12241228    /*
    12251229     * Iterate the pages and apply the new state.
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