Changeset 17483 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 6, 2009 3:59:52 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r17465 r17483 1428 1428 { 1429 1429 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 1430 PGMMODE enmShadowMode = pVM->pgm.s.enmShadowMode; 1431 switch (enmShadowMode) 1432 { 1433 case PGMMODE_EPT: 1434 return pVM->pgm.s.HCPhysShwNestedRoot; 1435 1436 default: 1437 return pVM->pgm.s.HCPhysShwCR3; 1438 } 1430 Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 1431 return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key; 1439 1432 #else 1440 1433 PGMMODE enmShadowMode = pVM->pgm.s.enmShadowMode; … … 1474 1467 { 1475 1468 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 1476 return pVM->pgm.s.HCPhysShwCR3; 1469 Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 1470 return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key; 1477 1471 #else 1478 1472 switch (enmShadowMode) … … 1516 1510 { 1517 1511 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 1518 return pVM->pgm.s.HCPhysShwCR3; 1512 Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 1513 return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key; 1519 1514 #else 1520 1515 return pVM->pgm.s.HCPhysShw32BitPD; … … 1531 1526 { 1532 1527 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 1533 return pVM->pgm.s.HCPhysShwCR3; 1528 Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 1529 return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key; 1534 1530 #else 1535 1531 return pVM->pgm.s.HCPhysShwPaePdpt; … … 1545 1541 VMMDECL(RTHCPHYS) PGMGetHyperAmd64CR3(PVM pVM) 1546 1542 { 1543 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 1544 Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 1545 return pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key; 1546 #else 1547 1547 return pVM->pgm.s.HCPhysShwCR3; 1548 #endif 1548 1549 } 1549 1550 -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r17438 r17483 973 973 # else /* PGM_SHW_TYPE == PGM_TYPE_AMD64 */ 974 974 /* PML4 */ 975 # ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY 975 976 AssertReturn(pVM->pgm.s.pShwRootR3, VERR_INTERNAL_ERROR); 977 # endif 976 978 977 979 const unsigned iPml4 = (GCPtrPage >> X86_PML4_SHIFT) & X86_PML4_MASK; … … 4774 4776 pVM->pgm.s.pShwPageCR3RC = MMHyperCCToRC(pVM, pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 4775 4777 # endif 4776 pVM->pgm.s.pShwRootR3 = (R3PTRTYPE(void *))pVM->pgm.s.CTX_SUFF(pShwPageCR3)->pvPageR3;4777 Assert(pVM->pgm.s.pShwRootR3);4778 # ifndef VBOX_WITH_2X_4GB_ADDR_SPACE4779 pVM->pgm.s.pShwRootR0 = (R0PTRTYPE(void *))PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pVM->pgm.s.CTX_SUFF(pShwPageCR3));4780 # endif4781 pVM->pgm.s.HCPhysShwCR3 = pVM->pgm.s.CTX_SUFF(pShwPageCR3)->Core.Key;4782 4778 4783 4779 # ifndef PGM_WITHOUT_MAPPINGS … … 4899 4895 # endif 4900 4896 4901 pVM->pgm.s.pShwRootR3 = 0;4902 # ifndef VBOX_WITH_2X_4GB_ADDR_SPACE4903 pVM->pgm.s.pShwRootR0 = 0;4904 # endif4905 pVM->pgm.s.HCPhysShwCR3 = 0;4906 4897 if (pVM->pgm.s.CTX_SUFF(pShwPageCR3)) 4907 4898 { 4908 4899 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 4900 4901 Assert(pVM->pgm.s.iShwUser != PGMPOOL_IDX_NESTED_ROOT); 4909 4902 4910 4903 /* Mark the page as unlocked; allow flushing again. */ -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r17470 r17483 137 137 #endif 138 138 139 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)139 #if !defined(VBOX_WITH_PGMPOOL_PAGING_ONLY) && (defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)) 140 140 /** 141 141 * Maps a pool page into the current context. … … 156 156 switch (pPage->idx) 157 157 { 158 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY159 case PGMPOOL_IDX_PD:160 case PGMPOOL_IDX_PDPT:161 case PGMPOOL_IDX_AMD64_CR3:162 return pPGM->pShwRootRC;163 # else164 158 case PGMPOOL_IDX_PD: 165 159 return pPGM->pShw32BitPdRC; … … 175 169 case PGMPOOL_IDX_PDPT: 176 170 return pPGM->pShwPaePdptRC; 177 # endif178 171 default: 179 172 AssertReleaseMsgFailed(("Invalid index %d\n", pPage->idx)); … … 185 178 switch (pPage->idx) 186 179 { 187 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY188 case PGMPOOL_IDX_PD:189 case PGMPOOL_IDX_PDPT:190 case PGMPOOL_IDX_AMD64_CR3:191 HCPhys = pPGM->HCPhysShwCR3;192 break;193 194 case PGMPOOL_IDX_NESTED_ROOT:195 HCPhys = pPGM->HCPhysShwNestedRoot;196 break;197 # else198 180 case PGMPOOL_IDX_PD: 199 181 HCPhys = pPGM->HCPhysShw32BitPD; … … 220 202 AssertReleaseMsgFailed(("PGMPOOL_IDX_PAE_PD is not usable in VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 context\n")); 221 203 return NULL; 222 # endif223 204 default: 224 205 AssertReleaseMsgFailed(("Invalid index %d\n", pPage->idx));
Note:
See TracChangeset
for help on using the changeset viewer.