VirtualBox

Ignore:
Timestamp:
Jun 21, 2010 12:35:33 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62891
Message:

PGM: PGMShwModifyPage/PGMShwSetPage -> PGMShwMakePageWritable, PGMShwMakePageReadonly & PGMShwMakePageNotPresent and made the low level worker make the page writable before setting the X86_PTE_RW bit. PGMR3PhysTlbGCPhys2Ptr should make write monitored pages writable (?). PGMDynMapGCPage and PGMDynMapGCPageOff must make the pages writable and take the PGM lock.

File:
1 edited

Legend:

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

    r30302 r30326  
    12371237 * @param   iPage               The page index.
    12381238 */
    1239 static void pgmR3StateVerifyCrc32ForPage(void const *pvPage, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage)
     1239static void pgmR3StateVerifyCrc32ForPage(void const *pvPage, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage, const  char *pszWhere)
    12401240{
    12411241    if (paLSPages[iPage].u32Crc != UINT32_MAX)
    12421242    {
    12431243        uint32_t u32Crc = RTCrc32(pvPage, PAGE_SIZE);
    1244         Assert((!PGM_PAGE_IS_ZERO(&pCur->aPages[iPage]) && !PGM_PAGE_IS_BALLOONED(&pCur->aPages[iPage])) || u32Crc == PGM_STATE_CRC32_ZERO_PAGE);
     1244        Assert(   (   !PGM_PAGE_IS_ZERO(&pCur->aPages[iPage])
     1245                   && !PGM_PAGE_IS_BALLOONED(&pCur->aPages[iPage]))
     1246               || u32Crc == PGM_STATE_CRC32_ZERO_PAGE);
    12451247        AssertMsg(paLSPages[iPage].u32Crc == u32Crc,
    1246                   ("%08x != %08x for %RGp %R[pgmpage]\n", paLSPages[iPage].u32Crc, u32Crc,
    1247                    pCur->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT), &pCur->aPages[iPage]));
     1248                  ("%08x != %08x for %RGp %R[pgmpage] %s\n", paLSPages[iPage].u32Crc, u32Crc,
     1249                   pCur->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT), &pCur->aPages[iPage], pszWhere));
    12481250    }
    12491251}
     
    12591261 * @param   iPage               The page index.
    12601262 */
    1261 static void pgmR3StateVerifyCrc32ForRamPage(PVM pVM, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage)
     1263static void pgmR3StateVerifyCrc32ForRamPage(PVM pVM, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage, const char *pszWhere)
    12621264{
    12631265    if (paLSPages[iPage].u32Crc != UINT32_MAX)
     
    12671269        int rc = pgmPhysGCPhys2CCPtrInternalReadOnly(pVM, &pCur->aPages[iPage], GCPhys, &pvPage);
    12681270        if (RT_SUCCESS(rc))
    1269             pgmR3StateVerifyCrc32ForPage(pvPage, pCur, paLSPages, iPage);
     1271            pgmR3StateVerifyCrc32ForPage(pvPage, pCur, paLSPages, iPage, pszWhere);
    12701272    }
    12711273}
     
    13701372                                        pgmR3StateCalcCrc32ForRamPage(pVM, pCur, paLSPages, iPage);
    13711373                                    else
    1372                                         pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage);
     1374                                        pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage, "scan");
    13731375#endif
    13741376                                    paLSPages[iPage].fWriteMonitoredJustNow = 0;
     
    15681570#ifdef PGMLIVESAVERAMPAGE_WITH_CRC32
    15691571                            if (PGM_PAGE_GET_TYPE(&pCur->aPages[iPage]) != PGMPAGETYPE_RAM)
    1570                                 pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage);
     1572                                pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage, "save#1");
    15711573#endif
    15721574                            continue;
     
    15971599#ifdef PGMLIVESAVERAMPAGE_WITH_CRC32
    15981600                            if (paLSPages)
    1599                                 pgmR3StateVerifyCrc32ForPage(abPage, pCur, paLSPages, iPage);
     1601                                pgmR3StateVerifyCrc32ForPage(abPage, pCur, paLSPages, iPage, "save#3");
    16001602#endif
    16011603                        }
     
    16191621#ifdef PGMLIVESAVERAMPAGE_WITH_CRC32
    16201622                        if (paLSPages)
    1621                             pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage);
     1623                            pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage, "save#2");
    16221624#endif
    16231625                        pgmUnlock(pVM);
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