Changeset 23532 in vbox for trunk/src/VBox
- Timestamp:
- Oct 3, 2009 6:06:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMSavedState.cpp
r23524 r23532 1097 1097 { 1098 1098 uint32_t const idRamRangesGen = pVM->pgm.s.idRamRangesGen; 1099 uint32_t cSinceYield = 0;1100 1099 for (pCur = pVM->pgm.s.pRamRangesR3; pCur; pCur = pCur->pNextR3) 1101 1100 { … … 1107 1106 uint32_t iPage = GCPhysCur <= pCur->GCPhys ? 0 : (GCPhysCur - pCur->GCPhys) >> PAGE_SHIFT; 1108 1107 GCPhysCur = 0; 1109 for (; iPage < cPages; iPage++ , cSinceYield++)1108 for (; iPage < cPages; iPage++) 1110 1109 { 1111 1110 /* Do yield first. */ 1112 1111 if ( !fFinalPass 1113 && ( cSinceYield & 0x7ff) == 0x7ff1114 && 1115 && 1112 && (iPage & 0x7ff) == 0x100 1113 && PDMR3CritSectYield(&pVM->pgm.s.CritSect) 1114 && pVM->pgm.s.idRamRangesGen != idRamRangesGen) 1116 1115 { 1117 1116 GCPhysCur = pCur->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT); … … 1276 1275 { 1277 1276 uint32_t const idRamRangesGen = pVM->pgm.s.idRamRangesGen; 1278 uint32_t cSinceYield = 0;1279 1277 for (pCur = pVM->pgm.s.pRamRangesR3; pCur; pCur = pCur->pNextR3) 1280 1278 { … … 1286 1284 uint32_t iPage = GCPhysCur <= pCur->GCPhys ? 0 : (GCPhysCur - pCur->GCPhys) >> PAGE_SHIFT; 1287 1285 GCPhysCur = 0; 1288 for (; iPage < cPages; iPage++ , cSinceYield++)1286 for (; iPage < cPages; iPage++) 1289 1287 { 1290 1288 /* Do yield first. */ 1291 if ( 1292 && (cSinceYield & 0x7ff) == 0x7ff1293 && 1294 && 1289 if ( uPass != SSM_PASS_FINAL 1290 && (iPage & 0x7ff) == 0x100 1291 && PDMR3CritSectYield(&pVM->pgm.s.CritSect) 1292 && pVM->pgm.s.idRamRangesGen != idRamRangesGen) 1295 1293 { 1296 1294 GCPhysCur = pCur->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT); … … 1906 1904 static int pgmR3LoadPageBitsOld(PVM pVM, PSSMHANDLE pSSM, uint8_t uType, PPGMPAGE pPage, RTGCPHYS GCPhys, PPGMRAMRANGE pRam) 1907 1905 { 1908 int rc;1909 1910 1906 /* 1911 1907 * Match up the type, dealing with MMIO2 aliases (dropped). … … 1920 1916 */ 1921 1917 void *pvPage; 1922 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, &pvPage);1918 int rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, &pvPage); 1923 1919 if (RT_SUCCESS(rc)) 1924 1920 rc = SSMR3GetMem(pSSM, pvPage, PAGE_SIZE); … … 1941 1937 static int pgmR3LoadPageOld(PVM pVM, PSSMHANDLE pSSM, uint8_t uType, PPGMPAGE pPage, RTGCPHYS GCPhys, PPGMRAMRANGE pRam) 1942 1938 { 1943 uint8_t 1939 uint8_t uState; 1944 1940 int rc = SSMR3GetU8(pSSM, &uState); 1945 1941 AssertLogRelMsgRCReturn(rc, ("pPage=%R[pgmpage] GCPhys=%#x %s rc=%Rrc\n", pPage, GCPhys, pRam->pszDesc, rc), rc); … … 1976 1972 AssertLogRelMsgReturn(pRomPage, ("GCPhys=%RGp %s\n", GCPhys, pRam->pszDesc), VERR_INTERNAL_ERROR); 1977 1973 1978 uint8_t 1974 uint8_t uProt; 1979 1975 int rc = SSMR3GetU8(pSSM, &uProt); 1980 1976 AssertLogRelMsgRCReturn(rc, ("pPage=%R[pgmpage] GCPhys=%#x %s\n", pPage, GCPhys, pRam->pszDesc), rc); … … 2258 2254 * @param pSSM The SSM handle. 2259 2255 * @param uVersion The saved state version. 2256 * 2257 * @todo This needs splitting up if more record types or code twists are 2258 * added... 2260 2259 */ 2261 2260 static int pgmR3LoadMemory(PVM pVM, PSSMHANDLE pSSM, uint32_t uPass) … … 2264 2263 * Process page records until we hit the terminator. 2265 2264 */ 2266 RTGCPHYS GCPhys 2267 PPGMRAMRANGE pRamHint 2268 uint8_t id 2269 uint32_t iPage 2270 PPGMROMRANGE pRom 2271 PPGMMMIO2RANGE pMmio2 2265 RTGCPHYS GCPhys = NIL_RTGCPHYS; 2266 PPGMRAMRANGE pRamHint = NULL; 2267 uint8_t id = UINT8_MAX; 2268 uint32_t iPage = UINT32_MAX - 10; 2269 PPGMROMRANGE pRom = NULL; 2270 PPGMMMIO2RANGE pMmio2 = NULL; 2272 2271 for (;;) 2273 2272 { … … 2340 2339 } 2341 2340 id = UINT8_MAX; 2342 iPage = UINT32_MAX - 10;2343 2341 break; 2344 2342 }
Note:
See TracChangeset
for help on using the changeset viewer.