Changeset 7971 in vbox
- Timestamp:
- Apr 15, 2008 10:12:22 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInternal.h
r7961 r7971 170 170 * Never free such an entry. */ 171 171 #define PGM_PLXFLAGS_PERMANENT RT_BIT_64(10) 172 /** Mapping (hypervisor allocated pagetable). */ 173 #define PGM_PLXFLAGS_MAPPING RT_BIT_64(11) 172 174 /** @} */ 173 175 -
trunk/src/VBox/VMM/PGMMap.cpp
r7905 r7971 36 36 * Internal Functions * 37 37 *******************************************************************************/ 38 static void pgmR3MapClearPDEs(PPGM pPGM, PPGMMAPPING pMap, intiOldPDE);39 static void pgmR3MapSetPDEs(PVM pVM, PPGMMAPPING pMap, intiNewPDE);38 static void pgmR3MapClearPDEs(PPGM pPGM, PPGMMAPPING pMap, unsigned iOldPDE); 39 static void pgmR3MapSetPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iNewPDE); 40 40 static int pgmR3MapIntermediateCheckOne(PVM pVM, uintptr_t uAddress, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault); 41 41 static void pgmR3MapIntermediateDoOne(PVM pVM, uintptr_t uAddress, RTHCPHYS HCPhys, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault); … … 691 691 * @param iOldPDE The index of the 32-bit PDE corresponding to the base of the mapping. 692 692 */ 693 static void pgmR3MapClearPDEs(PPGM pPGM, PPGMMAPPING pMap, intiOldPDE)693 static void pgmR3MapClearPDEs(PPGM pPGM, PPGMMAPPING pMap, unsigned iOldPDE) 694 694 { 695 695 unsigned i = pMap->cPTs; … … 708 708 * PAE. 709 709 */ 710 const intiPD = iOldPDE / 256;711 intiPDE = iOldPDE * 2 % 512;710 const unsigned iPD = iOldPDE / 256; 711 unsigned iPDE = iOldPDE * 2 % 512; 712 712 pPGM->apInterPaePDs[iPD]->a[iPDE].u = 0; 713 713 pPGM->apHCPaePDs[iPD]->a[iPDE].u = 0; … … 715 715 pPGM->apInterPaePDs[iPD]->a[iPDE].u = 0; 716 716 pPGM->apHCPaePDs[iPD]->a[iPDE].u = 0; 717 718 /* Clear the PGM_PDFLAGS_MAPPING flag for the page directory pointer entry. (legacy PAE guest mode) */ 719 pPGM->pHCPaePDPT->a[iPD].u &= ~PGM_PLXFLAGS_MAPPING; 717 720 } 718 721 } … … 726 729 * @param iNewPDE The index of the 32-bit PDE corresponding to the base of the mapping. 727 730 */ 728 static void pgmR3MapSetPDEs(PVM pVM, PPGMMAPPING pMap, intiNewPDE)731 static void pgmR3MapSetPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iNewPDE) 729 732 { 730 733 PPGM pPGM = &pVM->pgm.s; … … 734 737 return; 735 738 736 Assert(PGMGetGuestMode(pVM) <= PGMMODE_ 32_BIT);739 Assert(PGMGetGuestMode(pVM) <= PGMMODE_PAE); 737 740 738 741 /* … … 759 762 * PAE. 760 763 */ 761 const intiPD = iNewPDE / 256;762 intiPDE = iNewPDE * 2 % 512;764 const unsigned iPD = iNewPDE / 256; 765 unsigned iPDE = iNewPDE * 2 % 512; 763 766 if (pPGM->apHCPaePDs[iPD]->a[iPDE].n.u1Present) 764 767 pgmPoolFree(pVM, pPGM->apHCPaePDs[iPD]->a[iPDE].u & X86_PDE_PAE_PG_MASK, PGMPOOL_IDX_PAE_PD, iNewPDE * 2); … … 775 778 pPGM->apInterPaePDs[iPD]->a[iPDE] = PdePae1; 776 779 pPGM->apHCPaePDs[iPD]->a[iPDE] = PdePae1; 780 781 /* Set the PGM_PDFLAGS_MAPPING flag in the page directory pointer entry. (legacy PAE guest mode) */ 782 pPGM->pHCPaePDPT->a[iPD].u |= PGM_PLXFLAGS_MAPPING; 777 783 } 778 784 } -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r7963 r7971 433 433 if (iShw < X86_PG_PAE_PDPE_ENTRIES) /* don't use ELEMENTS(uShw.pPDPT->a), because that's for long mode only */ 434 434 { 435 if (uShw.pPDPT->a[iShw].u & PGM_P DFLAGS_MAPPING)435 if (uShw.pPDPT->a[iShw].u & PGM_PLXFLAGS_MAPPING) 436 436 { 437 437 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s)); … … 447 447 if ( iShw2 != iShw 448 448 && iShw2 < X86_PG_PAE_PDPE_ENTRIES 449 && uShw.pPDPT->a[iShw2].u & PGM_P DFLAGS_MAPPING)449 && uShw.pPDPT->a[iShw2].u & PGM_PLXFLAGS_MAPPING) 450 450 { 451 451 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
Note:
See TracChangeset
for help on using the changeset viewer.