Changeset 16921 in vbox for trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
- Timestamp:
- Feb 18, 2009 4:31:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r16919 r16921 1201 1201 } 1202 1202 1203 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 1204 /** 1205 * Checks if the page is the active CR3 or is one of the four PDs of a PAE PDPT 1206 * 1207 * @returns VBox status code (appropriate for GC return). 1208 * @param pVM VM Handle. 1209 * @param pPage PGM pool page 1210 */ 1211 bool pgmPoolIsActiveRootpage(PVM pVM, PPGMPOOLPAGE pPage) 1212 { 1213 /* First check the simple case. */ 1214 if (pPage == pVM->pgm.s.CTX_SUFF(pShwPageCR3)) 1215 { 1216 LogFlow(("pgmPoolIsActiveRootpage found CR3 root\n")); 1217 pPage->cModifications = 0; /* reset counter */ 1218 return true; 1219 } 1220 1221 switch (PGMGetShadowMode(pVM)) 1222 { 1223 case PGMMODE_PAE: 1224 case PGMMODE_PAE_NX: 1225 { 1226 switch (pPage->enmKind) 1227 { 1228 case PGMPOOLKIND_PAE_PD_FOR_PAE_PD: 1229 case PGMPOOLKIND_PAE_PD0_FOR_32BIT_PD: 1230 case PGMPOOLKIND_PAE_PD1_FOR_32BIT_PD: 1231 case PGMPOOLKIND_PAE_PD2_FOR_32BIT_PD: 1232 case PGMPOOLKIND_PAE_PD3_FOR_32BIT_PD: 1233 { 1234 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(&pVM->pgm.s); 1235 Assert(pPdpt); 1236 1237 for (unsigned i=0;i<X86_PG_PAE_PDPE_ENTRIES;i++) 1238 { 1239 if ( pPdpt->a[i].n.u1Present 1240 && pPage->Core.Key == pPdpt->a[i].u & X86_PDPE_PG_MASK) 1241 { 1242 LogFlow(("pgmPoolIsActiveRootpage found PAE PDPE root\n")); 1243 pPage->cModifications = 0; /* reset counter */ 1244 return true; 1245 } 1246 } 1247 break; 1248 } 1249 } 1250 1251 break; 1252 } 1253 } 1254 1255 return false; 1256 } 1257 #endif 1203 1258 1204 1259 /** … … 1239 1294 bool fReused = false; 1240 1295 if ( ( pPage->cModifications < 48 /** @todo #define */ /** @todo need to check that it's not mapping EIP. */ /** @todo adjust this! */ 1241 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY 1296 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 1297 || pgmPoolIsActiveRootpage(pVM, pPage) 1298 #else 1242 1299 || pPage->fCR3Mix 1243 1300 #endif
Note:
See TracChangeset
for help on using the changeset viewer.