Changeset 9857 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 20, 2008 2:34:46 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r9855 r9857 960 960 # endif /* IN_RING3 */ 961 961 962 # if PGM_GST_TYPE == PGM_TYPE_AMD64 963 /* Fetch the pgm pool shadow descriptor. */ 964 PPGMPOOLPAGE pShwPdpt = pgmPoolGetPageByHCPhys(pVM, pPml4eDst->u & SHW_PDPT_MASK); 965 Assert(pShwPdpt); 966 # endif 962 967 963 968 # if PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64 969 PPGMPOOL pPool = pVM->pgm.s.CTXSUFF(pPool); 970 964 971 /* Fetch the pgm pool shadow descriptor. */ 965 PPGMPOOLPAGE pShwPde = pgmPoolGetPageByHCPhys(pVM, pPdptDst->a[iPdPte].u & X86_PDPE_PG_MASK);972 PPGMPOOLPAGE pShwPde = pgmPoolGetPageByHCPhys(pVM, pPdptDst->a[iPdPte].u & SHW_PDPE_PG_MASK); 966 973 Assert(pShwPde); 967 974 # endif … … 977 984 * Mark not present so we can resync the PML4E when it's used. 978 985 */ 979 LogFlow(("InvalidatePage: Out-of-sync PML4E at %VG pPml4eSrc=%RX64 Pml4eDst=%RX64\n",986 LogFlow(("InvalidatePage: Out-of-sync PML4E at %VGv Pml4eSrc=%RX64 Pml4eDst=%RX64\n", 980 987 GCPtrPage, (uint64_t)pPml4eSrc->u, (uint64_t)pPml4eDst->u)); 981 pgmPoolFree (pVM, pPml4eDst->u & X86_PML4E_PG_MASK, PGMPOOL_IDX_PML4, iPml4e);988 pgmPoolFreeByPage(pPool, pShwPdpt, PGMPOOL_IDX_PML4, iPml4e); 982 989 pPml4eDst->u = 0; 983 990 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDOutOfSync)); … … 989 996 * Mark not present so we can set the accessed bit. 990 997 */ 991 LogFlow(("InvalidatePage: Out-of-sync PML4E (A) at %VG pPml4eSrc=%RX64 Pml4eDst=%RX64\n",998 LogFlow(("InvalidatePage: Out-of-sync PML4E (A) at %VGv Pml4eSrc=%RX64 Pml4eDst=%RX64\n", 992 999 GCPtrPage, (uint64_t)pPml4eSrc->u, (uint64_t)pPml4eDst->u)); 993 pgmPoolFree (pVM, pPml4eDst->u & X86_PML4E_PG_MASK, PGMPOOL_IDX_PML4, iPml4e);1000 pgmPoolFreeByPage(pPool, pShwPdpt, PGMPOOL_IDX_PML4, iPml4e); 994 1001 pPml4eDst->u = 0; 995 1002 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDNAs)); … … 999 1006 else 1000 1007 { 1001 LogFlow(("InvalidatePage: Out-of-sync PML4E (P) at %VG pPml4eSrc=%RX64 Pml4eDst=%RX64\n",1008 LogFlow(("InvalidatePage: Out-of-sync PML4E (P) at %VGv Pml4eSrc=%RX64 Pml4eDst=%RX64\n", 1002 1009 GCPtrPage, (uint64_t)pPml4eSrc->u, (uint64_t)pPml4eDst->u)); 1003 pgmPoolFree (pVM, pPml4eDst->u & X86_PML4E_PG_MASK, PGMPOOL_IDX_PML4, iPml4e);1010 pgmPoolFreeByPage(pPool, pShwPdpt, PGMPOOL_IDX_PML4, iPml4e); 1004 1011 pPml4eDst->u = 0; 1005 1012 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDNPs)); … … 1007 1014 return VINF_SUCCESS; 1008 1015 } 1016 RTGCPHYS GCPhysPdpt = pPml4eSrc->u & GST_PDPT_MASK; 1017 1018 /* Check if the PML4 entry has changed. */ 1019 if (pShwPdpt->GCPhys != GCPhysPdpt) 1020 { 1021 LogFlow(("InvalidatePage: Out-of-sync PML4E (GCPhys) at %VGv %VGp vs %VGp PdpeSrc=%RX64 PdpeDst=%RX64\n", 1022 GCPtrPage, pShwPdpt->GCPhys, GCPhysPdpt, (uint64_t)PdpeSrc.u, (uint64_t)pPdpeDst->u)); 1023 pgmPoolFreeByPage(pPool, pShwPdpt, PGMPOOL_IDX_PML4, iPml4e); 1024 pPml4eDst->u = 0; 1025 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDNPs)); 1026 PGM_INVL_PG(GCPtrPage); 1027 } 1028 1009 1029 1010 1030 Assert(pPdpeDst->n.u1Present && pPdpeDst->u & SHW_PDPT_MASK); … … 1015 1035 { 1016 1036 /* 1017 * Mark not present so we can resync the P ML4E when it's used.1037 * Mark not present so we can resync the PDPTE when it's used. 1018 1038 */ 1019 LogFlow(("InvalidatePage: Out-of-sync PDPE at %VG pPdpeSrc=%RX64 PdpeDst=%RX64\n",1039 LogFlow(("InvalidatePage: Out-of-sync PDPE at %VGv PdpeSrc=%RX64 PdpeDst=%RX64\n", 1020 1040 GCPtrPage, (uint64_t)PdpeSrc.u, (uint64_t)pPdpeDst->u)); 1021 pgmPoolFree (pVM, pPdpeDst->u & SHW_PDPT_MASK, PGMPOOL_IDX_PML4, iPml4e);1041 pgmPoolFreeByPage(pPool, pShwPde, pShwPdpt->idx, iPdPte); 1022 1042 pPdpeDst->u = 0; 1023 1043 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDOutOfSync)); … … 1029 1049 * Mark not present so we can set the accessed bit. 1030 1050 */ 1031 LogFlow(("InvalidatePage: Out-of-sync PDPE (A) at %VG pPdpeSrc=%RX64 PdpeDst=%RX64\n",1051 LogFlow(("InvalidatePage: Out-of-sync PDPE (A) at %VGv PdpeSrc=%RX64 PdpeDst=%RX64\n", 1032 1052 GCPtrPage, (uint64_t)PdpeSrc.u, (uint64_t)pPdpeDst->u)); 1033 pgmPoolFree (pVM, pPdpeDst->u & SHW_PDPT_MASK, PGMPOOL_IDX_PML4, iPml4e);1053 pgmPoolFreeByPage(pPool, pShwPde, pShwPdpt->idx, iPdPte); 1034 1054 pPdpeDst->u = 0; 1035 1055 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDNAs)); … … 1039 1059 else 1040 1060 { 1041 LogFlow(("InvalidatePage: Out-of-sync PDPE (P) at %VG pPdpeSrc=%RX64 PdpeDst=%RX64\n",1061 LogFlow(("InvalidatePage: Out-of-sync PDPE (P) at %VGv PdpeSrc=%RX64 PdpeDst=%RX64\n", 1042 1062 GCPtrPage, (uint64_t)PdpeSrc.u, (uint64_t)pPdpeDst->u)); 1043 pgmPoolFree (pVM, pPdpeDst->u & SHW_PDPT_MASK, PGMPOOL_IDX_PDPT, iPDDst);1063 pgmPoolFreeByPage(pPool, pShwPde, pShwPdpt->idx, iPdPte); 1044 1064 pPdpeDst->u = 0; 1045 1065 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDNPs)); 1046 1066 PGM_INVL_PG(GCPtrPage); 1047 1067 return VINF_SUCCESS; 1068 } 1069 RTGCPHYS GCPhysPd = PdpeSrc.u & GST_PDPE_PG_MASK; 1070 1071 /* Check if the PDPT entry has changed. */ 1072 if (pShwPde->GCPhys != GCPhysPd) 1073 { 1074 LogFlow(("InvalidatePage: Out-of-sync PDPE (GCPhys) at %VGv %VGp vs %VGp PdpeSrc=%RX64 PdpeDst=%RX64\n", 1075 GCPtrPage, pShwPde->GCPhys, GCPhysPd, (uint64_t)PdpeSrc.u, (uint64_t)pPdpeDst->u)); 1076 pgmPoolFreeByPage(pPool, pShwPde, pShwPdpt->idx, iPdPte); 1077 pPdpeDst->u = 0; 1078 STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,InvalidatePagePDNPs)); 1079 PGM_INVL_PG(GCPtrPage); 1048 1080 } 1049 1081 # endif -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r9701 r9857 88 88 # define GST_TOTAL_PD_ENTRIES (X86_PG_PAE_ENTRIES * X86_PG_PAE_PDPE_ENTRIES) 89 89 # define GST_PDPE_ENTRIES X86_PG_PAE_PDPE_ENTRIES 90 # define GST_PDPE_PG_MASK X86_PDPE_PG_MASK 90 91 # define GST_PDPT_SHIFT X86_PDPT_SHIFT 91 92 # define GST_PDPT_MASK X86_PDPT_MASK_PAE … … 95 96 # define GST_PDPE_ENTRIES X86_PG_AMD64_PDPE_ENTRIES 96 97 # define GST_PDPT_SHIFT X86_PDPT_SHIFT 98 # define GST_PDPE_PG_MASK X86_PDPE_PG_MASK_FULL 97 99 # define GST_PDPT_MASK X86_PDPT_MASK_AMD64 98 100 # define GST_PTE_PG_MASK X86_PTE_PAE_PG_MASK_FULL -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r9692 r9857 75 75 # define SHW_PT_MASK X86_PT_PAE_MASK 76 76 #if PGM_SHW_TYPE == PGM_TYPE_AMD64 77 # define SHW_PDPT_SHIFT X86_PDPT_SHIFT 78 # define SHW_PDPT_MASK X86_PDPT_MASK_AMD64 77 # define SHW_PDPT_SHIFT X86_PDPT_SHIFT 78 # define SHW_PDPT_MASK X86_PDPT_MASK_AMD64 79 # define SHW_PDPE_PG_MASK X86_PDPE_PG_MASK 79 80 # define SHW_TOTAL_PD_ENTRIES (X86_PG_AMD64_ENTRIES*X86_PG_AMD64_PDPE_ENTRIES) 80 81 # define SHW_POOL_ROOT_IDX PGMPOOL_IDX_PAE_PD 81 82 #else /* 32 bits PAE mode */ 82 # define SHW_PDPT_SHIFT X86_PDPT_SHIFT 83 # define SHW_PDPT_MASK X86_PDPT_MASK_PAE 83 # define SHW_PDPT_SHIFT X86_PDPT_SHIFT 84 # define SHW_PDPT_MASK X86_PDPT_MASK_PAE 85 # define SHW_PDPE_PG_MASK X86_PDPE_PG_MASK 84 86 # define SHW_TOTAL_PD_ENTRIES (X86_PG_PAE_ENTRIES*X86_PG_PAE_PDPE_ENTRIES) 85 87 # define SHW_POOL_ROOT_IDX PGMPOOL_IDX_PAE_PD
Note:
See TracChangeset
for help on using the changeset viewer.