Changeset 17558 in vbox
- Timestamp:
- Mar 9, 2009 9:52:37 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMShw.h
r17557 r17558 191 191 192 192 Assert(HWACCMIsNestedPagingActive(pVM)); 193 Assert(!pVM->pgm.s.pShwPageCR3R3); 193 194 /* Free the old CR3 root. */ 195 if (pVM->pgm.s.CTX_SUFF(pShwPageCR3)) 196 { 197 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 198 199 /* Mark the page as unlocked; allow flushing again. */ 200 pgmPoolUnlockPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 201 202 pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable); 203 pVM->pgm.s.pShwPageCR3R3 = 0; 204 pVM->pgm.s.pShwPageCR3R0 = 0; 205 pVM->pgm.s.pShwPageCR3RC = 0; 206 pVM->pgm.s.iShwUser = 0; 207 pVM->pgm.s.iShwUserTable = 0; 208 } 194 209 195 210 int rc = pgmPoolAlloc(pVM, GCPhysCR3, PGMPOOLKIND_ROOT_NESTED, PGMPOOL_IDX_NESTED_ROOT, GCPhysCR3 >> PAGE_SHIFT, &pNewShwPageCR3); … … 247 262 PGM_SHW_DECL(int, Exit)(PVM pVM) 248 263 { 249 #if PGM_SHW_TYPE == PGM_TYPE_NESTED 250 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 251 if (pVM->pgm.s.CTX_SUFF(pShwPageCR3)) 252 { 253 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 254 255 Assert(pVM->pgm.s.iShwUser == PGMPOOL_IDX_NESTED_ROOT); 256 257 /* Mark the page as unlocked; allow flushing again. */ 258 pgmPoolUnlockPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 259 260 pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable); 261 pVM->pgm.s.pShwPageCR3R3 = 0; 262 pVM->pgm.s.pShwPageCR3R0 = 0; 263 pVM->pgm.s.pShwPageCR3RC = 0; 264 pVM->pgm.s.iShwUser = 0; 265 pVM->pgm.s.iShwUserTable = 0; 266 } 267 # else 264 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY 265 # if PGM_SHW_TYPE == PGM_TYPE_NESTED 268 266 Assert(HWACCMIsNestedPagingActive(pVM)); 269 267 pVM->pgm.s.pShwRootR3 = 0; -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r17556 r17558 4259 4259 int rc = PGM_BTH_PFN(UnmapCR3, pVM)(pVM); 4260 4260 AssertRC(rc); 4261 4262 /* Exit the current shadow paging mode as well; nested paging and EPT use a root CR3 which will get flushed here. */4263 rc = PGM_SHW_PFN(Exit, pVM)(pVM);4264 AssertRC(rc);4265 4261 #endif 4266 4262
Note:
See TracChangeset
for help on using the changeset viewer.