Changeset 10021 in vbox
- Timestamp:
- Jun 30, 2008 3:13:44 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r9982 r10021 1264 1264 AssertRelease((uintptr_t)pVM->pgm.s.apHCPaePDs[2] + PAGE_SIZE == (uintptr_t)pVM->pgm.s.apHCPaePDs[3]); 1265 1265 pVM->pgm.s.pHCPaePDPT = (PX86PDPT)MMR3PageAllocLow(pVM); 1266 pVM->pgm.s.pHCNestedRoot = MMR3PageAllocLow(pVM); 1267 1266 1268 if ( !pVM->pgm.s.pHC32BitPD 1267 1269 || !pVM->pgm.s.apHCPaePDs[0] … … 1269 1271 || !pVM->pgm.s.apHCPaePDs[2] 1270 1272 || !pVM->pgm.s.apHCPaePDs[3] 1271 || !pVM->pgm.s.pHCPaePDPT) 1273 || !pVM->pgm.s.pHCPaePDPT 1274 || !pVM->pgm.s.pHCNestedRoot) 1272 1275 { 1273 1276 AssertMsgFailed(("Failed to allocate pages for the intermediate context!\n")); … … 1283 1286 pVM->pgm.s.aHCPhysPaePDs[3] = MMPage2Phys(pVM, pVM->pgm.s.apHCPaePDs[3]); 1284 1287 pVM->pgm.s.HCPhysPaePDPT = MMPage2Phys(pVM, pVM->pgm.s.pHCPaePDPT); 1288 pVM->pgm.s.HCPhysNestedRoot = MMPage2Phys(pVM, pVM->pgm.s.pHCNestedRoot); 1285 1289 1286 1290 /* … … 1288 1292 */ 1289 1293 ASMMemZero32(pVM->pgm.s.pHC32BitPD, PAGE_SIZE); 1290 1291 1294 ASMMemZero32(pVM->pgm.s.pHCPaePDPT, PAGE_SIZE); 1295 ASMMemZero32(pVM->pgm.s.pHCNestedRoot, PAGE_SIZE); 1292 1296 for (unsigned i = 0; i < ELEMENTS(pVM->pgm.s.apHCPaePDs); i++) 1293 1297 { -
trunk/src/VBox/VMM/PGMGst.h
r8415 r10021 223 223 PGM_GST_DECL(int, Enter)(PVM pVM, RTGCPHYS GCPhysCR3) 224 224 { 225 Assert(!HWACCMIsNestedPagingActive(pVM)); 225 226 /* 226 227 * Map and monitor CR3 … … 255 256 PGM_GST_DECL(int, Exit)(PVM pVM) 256 257 { 258 Assert(!HWACCMIsNestedPagingActive(pVM)); 257 259 int rc = PGM_GST_NAME(UnmonitorCR3)(pVM); 258 260 if (VBOX_SUCCESS(rc)) -
trunk/src/VBox/VMM/PGMInternal.h
r9990 r10021 2006 2006 /** @}*/ 2007 2007 2008 /** @name Nested Shadow Paging 2009 * @{ */ 2010 /** Root table; format depends on the host paging mode (AMD-V) or EPT */ 2011 R3R0PTRTYPE(void *) pHCNestedRoot; 2012 /** The Physical Address (HC) of the nested paging root. */ 2013 RTHCPHYS HCPhysNestedRoot; 2014 2008 2015 /** @name Function pointers for Shadow paging. 2009 2016 * @{ -
trunk/src/VBox/VMM/PGMShw.h
r9106 r10021 138 138 PGM_SHW_DECL(int, Enter)(PVM pVM) 139 139 { 140 #if PGM_SHW_MODE == PGM_MODE_AMD64 141 /* 142 * Set the RW, US and A flags for the fixed PDPEs. 143 */ 140 #if PGM_SHW_MODE == PGMMODE_NESTED 141 Assert(HWACCMIsNestedPagingActive(pVM)); 142 143 /* In non-nested mode we allocate the PML4 page on-demand; in nested mode we just use our fixed nested paging root. */ 144 pVM->pgm.s.pHCPaePML4 = (PX86PML4)pVM->pgm.s.pHCNestedRoot; 144 145 #endif 145 146 return VINF_SUCCESS; … … 169 170 PGM_SHW_DECL(int, Exit)(PVM pVM) 170 171 { 171 #if PGM_SHW_MODE == PGM_MODE_AMD64 172 /* 173 * Clear the RW, US and A flags for the fixed PDPEs. 174 */ 172 #if PGM_SHW_MODE == PGMMODE_NESTED 173 Assert(HWACCMIsNestedPagingActive(pVM)); 174 pVM->pgm.s.pHCPaePML4 = 0; 175 175 #endif 176 176 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r9999 r10021 824 824 int rc; 825 825 826 Assert(!HWACCMIsNestedPagingActive(pVM));827 826 AssertReturn(pVM->pgm.s.pHCPaePML4, VERR_INTERNAL_ERROR); 828 827 … … 902 901 PPGMPOOLPAGE pShwPage; 903 902 904 Assert(!HWACCMIsNestedPagingActive(pVM));905 903 AssertReturn(pVM->pgm.s.pHCPaePML4, VERR_INTERNAL_ERROR); 906 904 -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r9990 r10021 408 408 PGM_GST_DECL(int, MapCR3)(PVM pVM, RTGCPHYS GCPhysCR3) 409 409 { 410 Assert(!HWACCMIsNestedPagingActive(pVM)); 410 411 #if PGM_GST_TYPE == PGM_TYPE_32BIT \ 411 412 || PGM_GST_TYPE == PGM_TYPE_PAE \ … … 511 512 { 512 513 LogFlow(("UnmapCR3\n")); 514 Assert(!HWACCMIsNestedPagingActive(pVM)); 513 515 514 516 int rc = VINF_SUCCESS; … … 561 563 { 562 564 Assert(!pVM->pgm.s.fMappingsFixed); 565 Assert(!HWACCMIsNestedPagingActive(pVM)); 563 566 int rc = VINF_SUCCESS; 564 567 … … 663 666 { 664 667 int rc = VINF_SUCCESS; 668 669 Assert(!HWACCMIsNestedPagingActive(pVM)); 665 670 666 671 /*
Note:
See TracChangeset
for help on using the changeset viewer.