- Timestamp:
- Oct 22, 2010 11:36:56 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMPool.cpp
r33333 r33343 652 652 { 653 653 /* 654 * We only care about shadow page tables .654 * We only care about shadow page tables that reference physical memory 655 655 */ 656 #ifdef PGM_WITH_LARGE_PAGES 657 case PGMPOOLKIND_EPT_PD_FOR_PHYS: /* Large pages reference 2 MB of physical memory, so we must clear them. */ 658 if (pPage->cPresent) 659 { 660 PX86PDPAE pShwPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pPool->CTX_SUFF(pVM), pVCpu, pPage); 661 for (unsigned i = 0; i < RT_ELEMENTS(pShwPD->a); i++) 662 { 663 Assert((pShwPD->a[i].u & (X86_PDE_PAE_MBZ_MASK_NX | UINT64_C(0x7ff0000000000200))) == 0); 664 if ( pShwPD->a[i].n.u1Present 665 && pShwPD->a[i].b.u1Size) 666 { 667 Assert(!(pShwPD->a[i].u & PGM_PDFLAGS_MAPPING)); 668 pShwPD->a[i].u = 0; 669 Assert(pPage->cPresent); 670 pPage->cPresent--; 671 } 672 } 673 if (pPage->cPresent == 0) 674 pPage->iFirstPresent = NIL_PGMPOOL_PRESENT_INDEX; 675 } 676 goto default_case; 677 678 case PGMPOOLKIND_PAE_PD_PHYS: /* Large pages reference 2 MB of physical memory, so we must clear them. */ 679 if (pPage->cPresent) 680 { 681 PEPTPD pShwPD = (PEPTPD)PGMPOOL_PAGE_2_PTR_V2(pPool->CTX_SUFF(pVM), pVCpu, pPage); 682 for (unsigned i = 0; i < RT_ELEMENTS(pShwPD->a); i++) 683 { 684 Assert((pShwPD->a[i].u & UINT64_C(0xfff0000000000f80)) == 0); 685 if ( pShwPD->a[i].n.u1Present 686 && pShwPD->a[i].b.u1Size) 687 { 688 Assert(!(pShwPD->a[i].u & PGM_PDFLAGS_MAPPING)); 689 pShwPD->a[i].u = 0; 690 Assert(pPage->cPresent); 691 pPage->cPresent--; 692 } 693 } 694 if (pPage->cPresent == 0) 695 pPage->iFirstPresent = NIL_PGMPOOL_PRESENT_INDEX; 696 } 697 goto default_case; 698 #endif /* PGM_WITH_LARGE_PAGES */ 699 656 700 case PGMPOOLKIND_32BIT_PT_FOR_32BIT_PT: 657 701 case PGMPOOLKIND_32BIT_PT_FOR_32BIT_4MB: … … 714 758 /* fall thru */ 715 759 760 #ifdef PGM_WITH_LARGE_PAGES 761 default_case: 762 #endif 716 763 default: 717 764 Assert(!pPage->cModifications || ++cModifiedPages);
Note:
See TracChangeset
for help on using the changeset viewer.