VirtualBox

Changeset 20796 in vbox


Ignore:
Timestamp:
Jun 22, 2009 6:57:52 PM (15 years ago)
Author:
vboxsync
Message:

PGMMap.cpp: Take the PGM lock in a few place to avoid assertions during VM creation.

File:
1 edited

Legend:

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

    r19679 r20796  
    677677    PVMCPU pVCpu = &pVM->aCpus[0];
    678678
     679    pgmLock(pVM);                           /* to avoid assertions */
    679680    rc = pgmMapDeactivateCR3(pVM, pVCpu->pgm.s.pShwPageCR3R3);
     681    pgmUnlock(pVM);
    680682    AssertRCReturn(rc, rc);
    681683
     
    944946    unsigned i     = pMap->cPTs;
    945947    PVMCPU   pVCpu = VMMGetCpu(pVM);
     948    pgmLock(pVM);                           /* to avoid assertions */
    946949
    947950    pgmMapClearShadowPDEs(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3), pMap, iOldPDE, false /*fDeactivateCR3*/);
     
    966969        pVM->pgm.s.apInterPaePDs[iPD]->a[iPDE].u = 0;
    967970    }
    968 }
     971
     972    pgmUnlock(pVM);
     973}
     974
    969975
    970976/**
     
    979985    PPGM   pPGM  = &pVM->pgm.s;
    980986    PVMCPU pVCpu = VMMGetCpu(pVM);
     987    pgmLock(pVM);                           /* to avoid assertions */
    981988
    982989    Assert(!pgmMapAreMappingsEnabled(&pVM->pgm.s) || PGMGetGuestMode(pVCpu) <= PGMMODE_PAE_NX);
     
    10141021        pPGM->apInterPaePDs[iPD]->a[iPDE] = PdePae1;
    10151022    }
    1016 }
     1023
     1024    pgmUnlock(pVM);
     1025}
     1026
    10171027
    10181028/**
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