- Timestamp:
- Apr 9, 2016 11:10:40 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106487
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r58781 r60401 1363 1363 1364 1364 rc = CFGMR3QueryBoolDef(CFGMR3GetRoot(pVM), "PageFusionAllowed", &pVM->pgm.s.fPageFusionAllowed, false); 1365 AssertLogRelRCReturn(rc, rc); 1366 1367 /** @cfgm{/PGM/ZeroRamPagesOnReset, boolean, true} 1368 * Whether to clear RAM pages on (hard) reset. */ 1369 rc = CFGMR3QueryBoolDef(pCfgPGM, "ZeroRamPagesOnReset", &pVM->pgm.s.fZeroRamPagesOnReset, true); 1365 1370 AssertLogRelRCReturn(rc, rc); 1366 1371 -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r58782 r60401 1948 1948 AssertMsg(((RTGCPHYS)iPage << PAGE_SHIFT) == pRam->cb, ("%RGp %RGp\n", (RTGCPHYS)iPage << PAGE_SHIFT, pRam->cb)); 1949 1949 1950 #ifndef NO_RAM_RESET 1951 if (!pVM->pgm.s.fRamPreAlloc) 1952 #else 1953 if (0) 1954 #endif 1950 if ( !pVM->pgm.s.fRamPreAlloc 1951 && pVM->pgm.s.fZeroRamPagesOnReset) 1955 1952 { 1956 1953 /* Replace all RAM pages by ZERO pages. */ … … 2025 2022 2026 2023 case PGM_PAGE_STATE_ALLOCATED: 2027 {2028 void *pvPage;2029 rc = pgmPhysPageMap(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT), &pvPage);2030 AssertLogRelRCReturn(rc, rc);2031 #ifndef NO_RAM_RESET 2032 ASMMemZeroPage(pvPage);2033 #endif 2024 if (pVM->pgm.s.fZeroRamPagesOnReset) 2025 { 2026 void *pvPage; 2027 rc = pgmPhysPageMap(pVM, pPage, pRam->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT), &pvPage); 2028 AssertLogRelRCReturn(rc, rc); 2029 ASMMemZeroPage(pvPage); 2030 } 2034 2031 break; 2035 }2036 2032 } 2037 2033 break; … … 3577 3573 */ 3578 3574 #ifndef VBOX_STRICT 3579 if (pVM->pgm.s.fRestoreRomPages AtReset)3575 if (pVM->pgm.s.fRestoreRomPagesOnReset) 3580 3576 #endif 3581 3577 { … … 3593 3589 if (memcmp(pvDstPage, pbSrcPage, RT_MIN(cbSrcLeft, PAGE_SIZE))) 3594 3590 { 3595 if (pVM->pgm.s.fRestoreRomPages AtReset)3591 if (pVM->pgm.s.fRestoreRomPagesOnReset) 3596 3592 { 3597 3593 void *pvDstPageW; … … 3613 3609 /* Clear the ROM restore flag now as we only need to do this once after 3614 3610 loading saved state. */ 3615 pVM->pgm.s.fRestoreRomPages AtReset = false;3611 pVM->pgm.s.fRestoreRomPagesOnReset = false; 3616 3612 3617 3613 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp
r58781 r60401 3301 3301 static DECLCALLBACK(int) pgmR3LoadDone(PVM pVM, PSSMHANDLE pSSM) 3302 3302 { 3303 pVM->pgm.s.fRestoreRomPages AtReset = true;3303 pVM->pgm.s.fRestoreRomPagesOnReset = true; 3304 3304 NOREF(pSSM); 3305 3305 return VINF_SUCCESS; -
trunk/src/VBox/VMM/include/PGMInternal.h
r60228 r60401 3249 3249 * enables the VM to start using an updated ROM without requiring powering 3250 3250 * down the VM, just rebooting or resetting it. */ 3251 bool fRestoreRomPagesAtReset; 3251 bool fRestoreRomPagesOnReset; 3252 /** Whether to automatically clear all RAM pages on reset. */ 3253 bool fZeroRamPagesOnReset; 3254 /** Alignment padding. */ 3255 bool afAlignment3[7]; 3252 3256 3253 3257 /** Indicates that PGMR3FinalizeMappings has been called and that further
Note:
See TracChangeset
for help on using the changeset viewer.