VirtualBox

Changeset 19675 in vbox for trunk


Ignore:
Timestamp:
May 14, 2009 8:08:42 AM (16 years ago)
Author:
vboxsync
Message:

Must acquire the pgm lock in pgm pool access handlers too.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMPool.cpp

    r19631 r19675  
    528528     * We cannot flush a page if we're in an async thread because of REM notifications.
    529529     */
     530    pgmLock(pVM);
    530531    if (!pVCpu)
    531532    {
     
    535536        if (!pPage->fReusedFlushPending)
    536537        {
     538            pgmUnlock(pVM);
    537539            int rc = VMR3ReqCallEx(pPool->pVMR3, VMCPUID_ANY, NULL, 0, VMREQFLAGS_NO_WAIT | VMREQFLAGS_VOID, (PFNRT)pgmR3PoolFlushReusedPage, 2, pPool, pPage);
    538540            AssertRCReturn(rc, rc);
     541            pgmLock(pVM);
    539542            pPage->fReusedFlushPending = true;
    540543            pPage->cModifications += 0x1000;
    541544        }
     545
    542546        pgmPoolMonitorChainChanging(pVCpu, pPool, pPage, GCPhys, pvPhys, NULL);
    543547        /** @todo r=bird: making unsafe assumption about not crossing entries here! */
     
    568572        STAM_PROFILE_STOP_EX(&pPool->StatMonitorR3, &pPool->StatMonitorR3FlushPage, a);
    569573    }
    570 
     574    pgmUnlock(pVM);
    571575    return VINF_PGM_HANDLER_DO_DEFAULT;
    572576}
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r19674 r19675  
    11181118    AssertRCReturn(rc, rc);
    11191119
     1120    pgmLock(pVM);
     1121
    11201122    /*
    11211123     * Check if it's worth dealing with.
     
    11351137             rc = pgmPoolAccessHandlerSimple(pVM, pVCpu, pPool, pPage, &Cpu, pRegFrame, GCPhysFault, pvFault);
    11361138             STAM_PROFILE_STOP_EX(&pVM->pgm.s.CTX_SUFF(pPool)->CTX_SUFF_Z(StatMonitor), &pPool->CTX_MID_Z(StatMonitor,Handled), a);
     1139             pgmUnlock(pVM);
    11371140             return rc;
    11381141        }
     
    11571160             rc = pgmPoolAccessHandlerSTOSD(pVM, pPool, pPage, &Cpu, pRegFrame, GCPhysFault, pvFault);
    11581161             STAM_PROFILE_STOP_EX(&pVM->pgm.s.CTX_SUFF(pPool)->CTX_SUFF_Z(StatMonitor), &pPool->CTX_MID_Z(StatMonitor,RepStosd), a);
     1162             pgmUnlock(pVM);
    11591163             return rc;
    11601164        }
     
    11781182        rc = VINF_SUCCESS;
    11791183    STAM_PROFILE_STOP_EX(&pVM->pgm.s.CTX_SUFF(pPool)->CTX_SUFF_Z(StatMonitor), &pPool->CTX_MID_Z(StatMonitor,FlushPage), a);
     1184    pgmUnlock(pVM);
    11801185    return rc;
    11811186}
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