VirtualBox

Changeset 19874 in vbox


Ignore:
Timestamp:
May 20, 2009 3:41:35 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
47561
Message:

Protect PGMShwModifyPage

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

Legend:

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

    r19833 r19874  
    839839     * Call worker.
    840840     */
    841     return PGM_SHW_PFN(ModifyPage, pVCpu)(pVCpu, GCPtr, cb, fFlags, fMask);
     841    PVM pVM = pVCpu->CTX_SUFF(pVM);
     842    pgmLock(pVM);
     843    int rc = PGM_SHW_PFN(ModifyPage, pVCpu)(pVCpu, GCPtr, cb, fFlags, fMask);
     844    pgmUnlock(pVM);
     845    return rc;
    842846}
    843847
  • trunk/src/VBox/VMM/VMMAll/PGMAllShw.h

    r19808 r19874  
    287287    int rc;
    288288
     289    Assert(PGMIsLockOwner(pVM));
    289290    /*
    290291     * Walk page tables and pages till we're done.
     
    356357            if (pPT->a[iPTE].n.u1Present)
    357358            {
    358                 pPT->a[iPTE].u = (pPT->a[iPTE].u & (fMask | SHW_PTE_PG_MASK)) | (fFlags & ~SHW_PTE_PG_MASK);
     359                SHWPTE Pte;
     360
     361                Pte.u = (pPT->a[iPTE].u & (fMask | SHW_PTE_PG_MASK)) | (fFlags & ~SHW_PTE_PG_MASK);
     362                ASMAtomicWriteSize(&pPT->a[iPTE], Pte.u);
    359363                Assert(pPT->a[iPTE].n.u1Present);
    360364# if PGM_SHW_TYPE == PGM_TYPE_EPT
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