Changeset 7961 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 14, 2008 5:09:45 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInternal.h
r7845 r7961 1280 1280 /** The extended PAE page directory (2048 entries, works as root currently). */ 1281 1281 #define PGMPOOL_IDX_PAE_PD 2 1282 /** PAE Page Directory Table 0. */ 1283 #define PGMPOOL_IDX_PAE_PD_0 3 1284 /** PAE Page Directory Table 1. */ 1285 #define PGMPOOL_IDX_PAE_PD_1 4 1286 /** PAE Page Directory Table 2. */ 1287 #define PGMPOOL_IDX_PAE_PD_2 5 1288 /** PAE Page Directory Table 3. */ 1289 #define PGMPOOL_IDX_PAE_PD_4 6 1282 1290 /** Page Directory Pointer Table (PAE root, not currently used). */ 1283 #define PGMPOOL_IDX_PDPT 31291 #define PGMPOOL_IDX_PDPT 7 1284 1292 /** Page Map Level-4 (64-bit root). */ 1285 #define PGMPOOL_IDX_PML4 41293 #define PGMPOOL_IDX_PML4 8 1286 1294 /** The first normal index. */ 1287 #define PGMPOOL_IDX_FIRST 51295 #define PGMPOOL_IDX_FIRST 9 1288 1296 /** The last valid index. (inclusive, 14 bits) */ 1289 1297 #define PGMPOOL_IDX_LAST 0x3fff -
trunk/src/VBox/VMM/PGMPool.cpp
r7945 r7961 232 232 pPool->aPages[NIL_PGMPOOL_IDX].enmKind = PGMPOOLKIND_INVALID; 233 233 234 /* The Shadow 32-bit PD. */234 /* The Shadow 32-bit PD. (32 bits guest paging) */ 235 235 pPool->aPages[PGMPOOL_IDX_PD].Core.Key = NIL_RTHCPHYS; 236 236 pPool->aPages[PGMPOOL_IDX_PD].GCPhys = NIL_RTGCPHYS; … … 239 239 pPool->aPages[PGMPOOL_IDX_PD].idx = PGMPOOL_IDX_PD; 240 240 241 /* The Shadow PAE PDs. This is actually 4 pages! */241 /* The Shadow PAE PDs. This is actually 4 pages! (32 bits guest paging) */ 242 242 pPool->aPages[PGMPOOL_IDX_PAE_PD].Core.Key = NIL_RTHCPHYS; 243 243 pPool->aPages[PGMPOOL_IDX_PAE_PD].GCPhys = NIL_RTGCPHYS; … … 245 245 pPool->aPages[PGMPOOL_IDX_PAE_PD].enmKind = PGMPOOLKIND_ROOT_PAE_PD; 246 246 pPool->aPages[PGMPOOL_IDX_PAE_PD].idx = PGMPOOL_IDX_PAE_PD; 247 248 /* The Shadow PAE PDs for PAE guest mode. */ 249 for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++) 250 { 251 pPool->aPages[PGMPOOL_IDX_PAE_PD_0 + i].Core.Key = NIL_RTHCPHYS; 252 pPool->aPages[PGMPOOL_IDX_PAE_PD_0 + i].GCPhys = NIL_RTGCPHYS; 253 pPool->aPages[PGMPOOL_IDX_PAE_PD_0 + i].pvPageHC = pVM->pgm.s.apHCPaePDs[i]; 254 pPool->aPages[PGMPOOL_IDX_PAE_PD_0 + i].enmKind = PGMPOOLKIND_PAE_PD_FOR_PAE_PD; 255 pPool->aPages[PGMPOOL_IDX_PAE_PD_0 + i].idx = PGMPOOL_IDX_PAE_PD_0 + i; 256 } 247 257 248 258 /* The Shadow PDPT. */ -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r7953 r7961 579 579 || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX); 580 580 581 rc = pgmPoolMonitorMonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PAE_PD , GCPhys);581 rc = pgmPoolMonitorMonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PAE_PD_0 + i, GCPhys); 582 582 # endif /* PGMPOOL_WITH_MIXED_PT_CR3 */ 583 583 if (VBOX_FAILURE(rc)) … … 658 658 # else /* PGMPOOL_WITH_MIXED_PT_CR3 */ 659 659 Assert(pVM->pgm.s.enmShadowMode == PGMMODE_PAE || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX); 660 int rc2 = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PAE_PD );660 int rc2 = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PAE_PD_0 + i); 661 661 # endif /* PGMPOOL_WITH_MIXED_PT_CR3 */ 662 662 AssertRC(rc2); -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r7959 r7961 388 388 } 389 389 390 case PGMPOOLKIND_PAE_PD_FOR_PAE_PD: 391 { 392 const unsigned iShw = off / sizeof(X86PTEPAE); 393 if (uShw.pPDPae->a[iShw].u & PGM_PDFLAGS_MAPPING) 394 { 395 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s)); 396 VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3); 397 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw)); 398 } 399 /* paranoia / a bit assumptive. */ 400 else if ( pCpu 401 && (off & 7) 402 && (off & 7) + pgmPoolDisasWriteSize(pCpu) > 8) 403 { 404 const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PTEPAE); 405 if ( iShw2 != iShw 406 && iShw2 < ELEMENTS(uShw.pPDPae->a) 407 && uShw.pPDPae->a[iShw2].u & PGM_PDFLAGS_MAPPING) 408 { 409 Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s)); 410 VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3); 411 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2)); 412 } 413 } 414 #if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */ 415 if ( uShw.pPDPae->a[iShw].n.u1Present 416 && !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3)) 417 { 418 LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX32 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u)); 419 # ifdef IN_GC /* TLB load - we're pushing things a bit... */ 420 ASMProbeReadByte(pvAddress); 421 # endif 422 pgmPoolFree(pPool->CTXSUFF(pVM), uShwpPDPae->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw); 423 uShw.pPDPae->a[iShw].u = 0; 424 } 425 #endif 426 break; 427 } 428 390 429 default: 391 430 AssertFatalMsgFailed(("enmKind=%d\n", pPage->enmKind));
Note:
See TracChangeset
for help on using the changeset viewer.