Changeset 9874 in vbox
- Timestamp:
- Jun 23, 2008 1:45:00 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
-
PGMAllGst.h (modified) (2 diffs)
-
PGMAllPool.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r9858 r9874 82 82 # define GST_BIG_PAGE_SIZE X86_PAGE_2M_SIZE 83 83 # define GST_BIG_PAGE_OFFSET_MASK X86_PAGE_2M_OFFSET_MASK 84 # define GST_PDE_PG_MASK X86_PDE_PAE_PG_MASK 84 # define GST_PDE_PG_MASK X86_PDE_PAE_PG_MASK_FULL 85 85 # define GST_PDE_BIG_PG_MASK X86_PDE2M_PAE_PG_MASK 86 86 # define GST_PD_SHIFT X86_PD_PAE_SHIFT … … 89 89 # define GST_TOTAL_PD_ENTRIES (X86_PG_PAE_ENTRIES * X86_PG_PAE_PDPE_ENTRIES) 90 90 # define GST_PDPE_ENTRIES X86_PG_PAE_PDPE_ENTRIES 91 # define GST_PDPE_PG_MASK X86_PDPE_PG_MASK 91 # define GST_PDPE_PG_MASK X86_PDPE_PG_MASK_FULL 92 92 # define GST_PDPT_SHIFT X86_PDPT_SHIFT 93 93 # define GST_PDPT_MASK X86_PDPT_MASK_PAE -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r9778 r9874 403 403 case PGMPOOLKIND_PAE_PD_FOR_PAE_PD: 404 404 { 405 const unsigned iShw = off / sizeof(X86P TEPAE);405 const unsigned iShw = off / sizeof(X86PDEPAE); 406 406 if (uShw.pPDPae->a[iShw].u & PGM_PDFLAGS_MAPPING) 407 407 { … … 410 410 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw)); 411 411 } 412 413 if (uShw.pPDPae->a[iShw].n.u1Present) 414 { 415 LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u)); 416 pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw); 417 uShw.pPDPae->a[iShw].u = 0; 418 } 419 412 420 /* paranoia / a bit assumptive. */ 413 elseif ( pCpu414 && (off & 7)415 && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PTEPAE))421 if ( pCpu 422 && (off & 7) 423 && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PTEPAE)) 416 424 { 417 425 const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PTEPAE); … … 424 432 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2)); 425 433 } 434 if (uShw.pPDPae->a[iShw2].n.u1Present) 435 { 436 LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPae->a[iShw2].u)); 437 pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPae->a[iShw2].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw2); 438 uShw.pPDPae->a[iShw2].u = 0; 439 } 426 440 } 427 #if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */428 if ( uShw.pPDPae->a[iShw].n.u1Present429 && !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3))430 {431 LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX32 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u));432 # ifdef IN_GC /* TLB load - we're pushing things a bit... */433 ASMProbeReadByte(pvAddress);434 # endif435 pgmPoolFree(pPool->CTXSUFF(pVM), uShwpPDPae->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw);436 uShw.pPDPae->a[iShw].u = 0;437 }438 #endif439 441 break; 440 442 } … … 479 481 * - messing with the bits of pd pointers without changing the physical address 480 482 */ 481 #if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */ 482 const unsigned iShw = off / sizeof(X86PDPE); 483 if ( uShw.pPDPT->a[iShw].n.u1Present 484 && !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3)) 483 if (!VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3)) 485 484 { 486 LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPT->a[iShw].u)); 487 pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPT->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw); 488 uShw.pPDPT->a[iShw].u = 0; 485 const unsigned iShw = off / sizeof(X86PDPE); 486 if (uShw.pPDPT->a[iShw].n.u1Present) 487 { 488 LogFlow(("pgmPoolMonitorChainChanging: pdpt iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPT->a[iShw].u)); 489 pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPT->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw); 490 uShw.pPDPT->a[iShw].u = 0; 491 } 492 /* paranoia / a bit assumptive. */ 493 if ( pCpu 494 && (off & 7) 495 && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PDPE)) 496 { 497 const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PDPE); 498 if (uShw.pPDPT->a[iShw2].n.u1Present) 499 { 500 LogFlow(("pgmPoolMonitorChainChanging: pdpt iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPT->a[iShw2].u)); 501 pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPT->a[iShw2].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw2); 502 uShw.pPDPT->a[iShw2].u = 0; 503 } 504 } 489 505 } 490 #endif491 506 break; 492 507 }
Note:
See TracChangeset
for help on using the changeset viewer.

