- Timestamp:
- Feb 9, 2009 4:41:00 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r16599 r16603 349 349 /* page/2 sized */ 350 350 case PGMPOOLKIND_PAE_PT_FOR_32BIT_PT: 351 { 351 352 uShw.pv = PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage); 352 353 if (!((off ^ pPage->GCPhys) & (PAGE_SIZE / 2))) … … 366 367 } 367 368 break; 369 } 370 371 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 372 case PGMPOOLKIND_PAE_PD_FOR_32BIT_PD: 373 { 374 unsigned iGst = off / sizeof(X86PDE); 375 unsigned iShwPdpt = iGst / 256; 376 unsigned iShw = (iGst % 256) * 2; 377 uShw.pv = PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage); 378 if (!((off ^ pPage->GCPhys) & (PAGE_SIZE / 2))) 379 { 380 if ((uShw.pPDPae->a[iShw].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P)) 381 { 382 Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s)); 383 VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3); 384 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShwPdpt=%#x iShw=%#x!\n", iShwPdpt, iShw)); 385 } 386 /* paranoia / a bit assumptive. */ 387 else if ( pCpu 388 && (off & 3) 389 && (off & 3) + cbWrite > 4) 390 { 391 const unsigned iShw2 = iShw + 2; 392 if ( iShw2 < RT_ELEMENTS(uShw.pPDPae->a) /** @todo was completely wrong, it's better now after #1865 but still wrong from cross PD. */ 393 && (uShw.pPDPae->a[iShw2].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P)) 394 { 395 Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s)); 396 VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3); 397 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShwPdpt=%#x iShw2=%#x!\n", iShwPdpt, iShw2)); 398 } 399 } 400 #if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */ 401 if ( uShw.pPDPae->a[iShw].n.u1Present 402 && !VM_FF_ISSET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3)) 403 { 404 LogFlow(("pgmPoolMonitorChainChanging: iShwPdpt=%#x iShw=%#x: %RX64 -> freeing it!\n", iShwPdpt, iShw, uShw.pPDPae->a[iShw].u)); 405 # ifdef IN_RC /* TLB load - we're pushing things a bit... */ 406 ASMProbeReadByte(pvAddress); 407 # endif 408 pgmPoolFree(pPool->CTX_SUFF(pVM), uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw + iShwPdpt * X86_PG_PAE_ENTRIES); 409 uShw.pPDPae->a[iShw].u = 0; 410 } 411 #endif 412 } 413 break; 414 } 415 # endif 416 368 417 369 418 case PGMPOOLKIND_PAE_PT_FOR_PAE_PT: … … 453 502 } 454 503 455 # 504 # ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY 456 505 case PGMPOOLKIND_ROOT_PAE_PD: 457 506 {
Note:
See TracChangeset
for help on using the changeset viewer.