Changeset 36042 in vbox for trunk/src/VBox
- Timestamp:
- Feb 21, 2011 4:51:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp
r36013 r36042 85 85 /** ROM protection (8-bit). */ 86 86 #define PGM_STATE_REC_ROM_PROT UINT8_C(0x07) 87 /** Ballooned page. */87 /** Ballooned page. No data. */ 88 88 #define PGM_STATE_REC_RAM_BALLOONED UINT8_C(0x08) 89 89 /** The last record type. */ … … 514 514 RTGCPHYS GCPhys = pRom->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT); 515 515 PPGMPAGE pPage = PGMROMPROT_IS_ROM(enmProt) ? &pRomPage->Shadow : pgmPhysGetPage(&pVM->pgm.s, GCPhys); 516 bool fZero = PGM_PAGE_IS_ZERO(pPage) || PGM_PAGE_IS_BALLOONED(pPage); /* Do we ever balloon shadow ROM pages!?*/516 bool fZero = PGM_PAGE_IS_ZERO(pPage) || PGM_PAGE_IS_BALLOONED(pPage); Assert(!PGM_PAGE_IS_BALLOONED(pPage)); /* Shouldn't be ballooned. */ 517 517 int rc = VINF_SUCCESS; 518 518 if (!fZero) … … 1364 1364 } 1365 1365 1366 pgmPhysPageWriteMonitor(pVM, &pCur->aPages[iPage], 1366 pgmPhysPageWriteMonitor(pVM, &pCur->aPages[iPage], 1367 1367 pCur->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT)); 1368 1368 paLSPages[iPage].fWriteMonitored = 1; … … 1672 1672 { 1673 1673 /* 1674 * Dirty zero page.1674 * Dirty zero or ballooned page. 1675 1675 */ 1676 1676 #ifdef PGMLIVESAVERAMPAGE_WITH_CRC32 … … 2566 2566 * @param pVM The VM handle. 2567 2567 * @param pSSM The SSM handle. 2568 * @param uVersion The PGM saved state unit version. 2568 2569 * @param uPass The pass number. 2569 2570 * … … 2571 2572 * added... 2572 2573 */ 2573 static int pgmR3LoadMemory(PVM pVM, PSSMHANDLE pSSM, uint32_t u Pass)2574 static int pgmR3LoadMemory(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 2574 2575 { 2575 2576 /* … … 2650 2651 case PGM_STATE_REC_RAM_ZERO: 2651 2652 { 2652 if ( PGM_PAGE_IS_ZERO(pPage) 2653 || PGM_PAGE_IS_BALLOONED(pPage)) 2653 if (PGM_PAGE_IS_ZERO(pPage)) 2654 2654 break; 2655 2656 /* Ballooned pages must be unmarked (live snapshot and 2657 teleportation scenarios). */ 2658 if (PGM_PAGE_IS_BALLOONED(pPage)) 2659 { 2660 Assert(PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM); 2661 if (uVersion == PGM_SAVED_STATE_VERSION_BALLOON_BROKEN) 2662 break; 2663 PGM_PAGE_SET_STATE(pPage, PGM_PAGE_STATE_ZERO); 2664 break; 2665 } 2666 2655 2667 AssertLogRelMsgReturn(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_ALLOCATED, ("GCPhys=%RGp %R[pgmpage]\n", GCPhys, pPage), VERR_INTERNAL_ERROR_5); 2656 2668 … … 2679 2691 case PGM_STATE_REC_RAM_BALLOONED: 2680 2692 { 2693 Assert(PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM); 2681 2694 if (PGM_PAGE_IS_BALLOONED(pPage)) 2682 2695 break; 2683 2696 2684 /* 2685 * We don't map ballooned pages in our shadow page tables, let's just free it if allocated and mark as ballooned. 2686 * See #5515. 2687 */ 2697 /* We don't map ballooned pages in our shadow page tables, let's 2698 just free it if allocated and mark as ballooned. See #5515. */ 2688 2699 if (PGM_PAGE_IS_ALLOCATED(pPage)) 2689 2700 { … … 3030 3041 } 3031 3042 3032 rc = pgmR3LoadMemory(pVM, pSSM, SSM_PASS_FINAL);3043 rc = pgmR3LoadMemory(pVM, pSSM, uVersion, SSM_PASS_FINAL); 3033 3044 } 3034 3045 else … … 3090 3101 pgmLock(pVM); 3091 3102 if (uPass != 0) 3092 rc = pgmR3LoadMemory(pVM, pSSM, u Pass);3103 rc = pgmR3LoadMemory(pVM, pSSM, uVersion, uPass); 3093 3104 else 3094 3105 { … … 3103 3114 rc = pgmR3LoadMmio2Ranges(pVM, pSSM); 3104 3115 if (RT_SUCCESS(rc)) 3105 rc = pgmR3LoadMemory(pVM, pSSM, u Pass);3116 rc = pgmR3LoadMemory(pVM, pSSM, uVersion, uPass); 3106 3117 } 3107 3118 pgmUnlock(pVM);
Note:
See TracChangeset
for help on using the changeset viewer.