Changeset 30326 in vbox for trunk/src/VBox/VMM/PGMSavedState.cpp
- Timestamp:
- Jun 21, 2010 12:35:33 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62891
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMSavedState.cpp
r30302 r30326 1237 1237 * @param iPage The page index. 1238 1238 */ 1239 static void pgmR3StateVerifyCrc32ForPage(void const *pvPage, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage )1239 static void pgmR3StateVerifyCrc32ForPage(void const *pvPage, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage, const char *pszWhere) 1240 1240 { 1241 1241 if (paLSPages[iPage].u32Crc != UINT32_MAX) 1242 1242 { 1243 1243 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); 1245 1247 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)); 1248 1250 } 1249 1251 } … … 1259 1261 * @param iPage The page index. 1260 1262 */ 1261 static void pgmR3StateVerifyCrc32ForRamPage(PVM pVM, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage )1263 static void pgmR3StateVerifyCrc32ForRamPage(PVM pVM, PPGMRAMRANGE pCur, PPGMLIVESAVERAMPAGE paLSPages, uint32_t iPage, const char *pszWhere) 1262 1264 { 1263 1265 if (paLSPages[iPage].u32Crc != UINT32_MAX) … … 1267 1269 int rc = pgmPhysGCPhys2CCPtrInternalReadOnly(pVM, &pCur->aPages[iPage], GCPhys, &pvPage); 1268 1270 if (RT_SUCCESS(rc)) 1269 pgmR3StateVerifyCrc32ForPage(pvPage, pCur, paLSPages, iPage );1271 pgmR3StateVerifyCrc32ForPage(pvPage, pCur, paLSPages, iPage, pszWhere); 1270 1272 } 1271 1273 } … … 1370 1372 pgmR3StateCalcCrc32ForRamPage(pVM, pCur, paLSPages, iPage); 1371 1373 else 1372 pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage );1374 pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage, "scan"); 1373 1375 #endif 1374 1376 paLSPages[iPage].fWriteMonitoredJustNow = 0; … … 1568 1570 #ifdef PGMLIVESAVERAMPAGE_WITH_CRC32 1569 1571 if (PGM_PAGE_GET_TYPE(&pCur->aPages[iPage]) != PGMPAGETYPE_RAM) 1570 pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage );1572 pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage, "save#1"); 1571 1573 #endif 1572 1574 continue; … … 1597 1599 #ifdef PGMLIVESAVERAMPAGE_WITH_CRC32 1598 1600 if (paLSPages) 1599 pgmR3StateVerifyCrc32ForPage(abPage, pCur, paLSPages, iPage );1601 pgmR3StateVerifyCrc32ForPage(abPage, pCur, paLSPages, iPage, "save#3"); 1600 1602 #endif 1601 1603 } … … 1619 1621 #ifdef PGMLIVESAVERAMPAGE_WITH_CRC32 1620 1622 if (paLSPages) 1621 pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage );1623 pgmR3StateVerifyCrc32ForRamPage(pVM, pCur, paLSPages, iPage, "save#2"); 1622 1624 #endif 1623 1625 pgmUnlock(pVM);
Note:
See TracChangeset
for help on using the changeset viewer.