- Timestamp:
- Feb 11, 2009 12:37:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r16654 r16660 657 657 * - messing with the bits of pd pointers without changing the physical address 658 658 */ 659 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 660 /* PDPT roots are not page aligned; 32 byte only! */ 661 const unsigned offPdpt = GCPhysFault - pPage->GCPhys; 662 # else 663 const unsigned offPdpt = off; 664 # endif 659 665 uShw.pv = PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage); 660 const unsigned iShw = off / sizeof(X86PDPE);666 const unsigned iShw = offPdpt / sizeof(X86PDPE); 661 667 if (iShw < X86_PG_PAE_PDPE_ENTRIES) /* don't use RT_ELEMENTS(uShw.pPDPT->a), because that's for long mode only */ 662 668 { … … 668 674 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw)); 669 675 } 676 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 677 else 678 if (uShw.pPDPT->a[iShw].n.u1Present) 679 { 680 LogFlow(("pgmPoolMonitorChainChanging: pae pdpt iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPT->a[iShw].u)); 681 pgmPoolFree(pPool->CTX_SUFF(pVM), 682 uShw.pPDPT->a[iShw].u & X86_PDPE_PG_MASK, 683 pPage->idx, 684 iShw); 685 uShw.pPDPT->a[iShw].u = 0; 686 } 687 # endif 688 670 689 /* paranoia / a bit assumptive. */ 671 elseif ( pCpu672 && (off& 7)673 && (off& 7) + cbWrite > sizeof(X86PDPE))690 if ( pCpu 691 && (offPdpt & 7) 692 && (offPdpt & 7) + cbWrite > sizeof(X86PDPE)) 674 693 { 675 const unsigned iShw2 = (off + cbWrite - 1) / sizeof(X86PDPE);694 const unsigned iShw2 = (offPdpt + cbWrite - 1) / sizeof(X86PDPE); 676 695 if ( iShw2 != iShw 677 && iShw2 < X86_PG_PAE_PDPE_ENTRIES 678 && uShw.pPDPT->a[iShw2].u & PGM_PLXFLAGS_MAPPING) 696 && iShw2 < X86_PG_PAE_PDPE_ENTRIES) 679 697 { 680 Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s)); 681 STAM_COUNTER_INC(&(pPool->CTX_SUFF(pVM)->pgm.s.StatRZGuestCR3WriteConflict)); 682 VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3); 683 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2)); 698 if (uShw.pPDPT->a[iShw2].u & PGM_PLXFLAGS_MAPPING) 699 { 700 Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s)); 701 STAM_COUNTER_INC(&(pPool->CTX_SUFF(pVM)->pgm.s.StatRZGuestCR3WriteConflict)); 702 VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3); 703 LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2)); 704 } 705 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 706 else 707 if (uShw.pPDPT->a[iShw2].n.u1Present) 708 { 709 LogFlow(("pgmPoolMonitorChainChanging: pae pdpt iShw=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPT->a[iShw2].u)); 710 pgmPoolFree(pPool->CTX_SUFF(pVM), 711 uShw.pPDPT->a[iShw2].u & X86_PDPE_PG_MASK, 712 pPage->idx, 713 iShw2); 714 uShw.pPDPT->a[iShw2].u = 0; 715 } 716 # endif 684 717 } 685 718 }
Note:
See TracChangeset
for help on using the changeset viewer.