Changeset 31167 in vbox
- Timestamp:
- Jul 28, 2010 2:38:43 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
-
PGMInline.h (modified) (13 diffs)
-
PGMInternal.h (modified) (1 diff)
-
VMMAll/PGMAll.cpp (modified) (8 diffs)
-
VMMAll/PGMAllBth.h (modified) (17 diffs)
-
VMMAll/PGMAllMap.cpp (modified) (8 diffs)
-
VMMAll/PGMAllShw.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInline.h
r31136 r31167 994 994 * 995 995 * @returns Pointer to the shadow 32-bit PD. 996 * @param p PGM Pointer to the PGM instance data.997 */ 998 DECLINLINE(PX86PD) pgmShwGet32BitPDPtr(P PGMCPU pPGM)999 { 1000 return (PX86PD)PGMPOOL_PAGE_2_PTR _BY_PGMCPU(pPGM, pPGM->CTX_SUFF(pShwPageCR3));996 * @param pVCpu The current CPU. 997 */ 998 DECLINLINE(PX86PD) pgmShwGet32BitPDPtr(PVMCPU pVCpu) 999 { 1000 return (PX86PD)PGMPOOL_PAGE_2_PTR(pVCpu->CTX_SUFF(pVM), pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1001 1001 } 1002 1002 … … 1006 1006 * 1007 1007 * @returns Shadow 32-bit PDE. 1008 * @param p PGM Pointer to the PGM instance data.1008 * @param pVCpu The current CPU. 1009 1009 * @param GCPtr The address. 1010 1010 */ 1011 DECLINLINE(X86PDE) pgmShwGet32BitPDE(P PGMCPU pPGM, RTGCPTR GCPtr)1011 DECLINLINE(X86PDE) pgmShwGet32BitPDE(PVMCPU pVCpu, RTGCPTR GCPtr) 1012 1012 { 1013 1013 const unsigned iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK; 1014 1014 1015 PX86PD pShwPde = pgmShwGet32BitPDPtr(p PGM);1015 PX86PD pShwPde = pgmShwGet32BitPDPtr(pVCpu); 1016 1016 if (!pShwPde) 1017 1017 { … … 1028 1028 * 1029 1029 * @returns Pointer to the shadow 32-bit PDE. 1030 * @param p PGM Pointer to the PGM instance data.1030 * @param pVCpu The current CPU. 1031 1031 * @param GCPtr The address. 1032 1032 */ 1033 DECLINLINE(PX86PDE) pgmShwGet32BitPDEPtr(P PGMCPU pPGM, RTGCPTR GCPtr)1033 DECLINLINE(PX86PDE) pgmShwGet32BitPDEPtr(PVMCPU pVCpu, RTGCPTR GCPtr) 1034 1034 { 1035 1035 const unsigned iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK; 1036 1036 1037 PX86PD pPde = pgmShwGet32BitPDPtr(p PGM);1037 PX86PD pPde = pgmShwGet32BitPDPtr(pVCpu); 1038 1038 AssertReturn(pPde, NULL); 1039 1039 return &pPde->a[iPd]; … … 1045 1045 * 1046 1046 * @returns Pointer to the shadow PAE PDPT. 1047 * @param p PGM Pointer to the PGM instance data.1048 */ 1049 DECLINLINE(PX86PDPT) pgmShwGetPaePDPTPtr(P PGMCPU pPGM)1050 { 1051 return (PX86PDPT)PGMPOOL_PAGE_2_PTR _BY_PGMCPU(pPGM, pPGM->CTX_SUFF(pShwPageCR3));1047 * @param pVCpu The current CPU. 1048 */ 1049 DECLINLINE(PX86PDPT) pgmShwGetPaePDPTPtr(PVMCPU pVCpu) 1050 { 1051 return (PX86PDPT)PGMPOOL_PAGE_2_PTR(pVCpu->CTX_SUFF(pVM), pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1052 1052 } 1053 1053 … … 1057 1057 * 1058 1058 * @returns Pointer to the shadow PD. 1059 * @param p PGM Pointer to the PGM instance data.1059 * @param pVCpu The current CPU. 1060 1060 * @param GCPtr The address. 1061 1061 */ 1062 DECLINLINE(PX86PDPAE) pgmShwGetPaePDPtr(P PGMCPU pPGM, RTGCPTR GCPtr)1062 DECLINLINE(PX86PDPAE) pgmShwGetPaePDPtr(PVMCPU pVCpu, RTGCPTR GCPtr) 1063 1063 { 1064 1064 const unsigned iPdpt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE; 1065 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(p PGM);1065 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(pVCpu); 1066 1066 1067 1067 if (!pPdpt->a[iPdpt].n.u1Present) … … 1069 1069 1070 1070 /* Fetch the pgm pool shadow descriptor. */ 1071 PPGMPOOLPAGE pShwPde = pgmPoolGetPage(PGMCPU2PGM(pPGM)->CTX_SUFF(pPool), pPdpt->a[iPdpt].u & X86_PDPE_PG_MASK); 1071 PVM pVM = pVCpu->CTX_SUFF(pVM); 1072 PPGMPOOLPAGE pShwPde = pgmPoolGetPage(pVM->pgm.s.CTX_SUFF(pPool), pPdpt->a[iPdpt].u & X86_PDPE_PG_MASK); 1072 1073 AssertReturn(pShwPde, NULL); 1073 1074 1074 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR _BY_PGMCPU(pPGM, pShwPde);1075 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR(pVM, pShwPde); 1075 1076 } 1076 1077 … … 1080 1081 * 1081 1082 * @returns Pointer to the shadow PD. 1082 * @param p PGM Pointer to the PGM instance data.1083 * @param pVCpu The current CPU. 1083 1084 * @param GCPtr The address. 1084 1085 */ 1085 DECLINLINE(PX86PDPAE) pgmShwGetPaePDPtr(P PGMCPU pPGM, PX86PDPT pPdpt, RTGCPTR GCPtr)1086 DECLINLINE(PX86PDPAE) pgmShwGetPaePDPtr(PVMCPU pVCpu, PX86PDPT pPdpt, RTGCPTR GCPtr) 1086 1087 { 1087 1088 const unsigned iPdpt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE; … … 1091 1092 1092 1093 /* Fetch the pgm pool shadow descriptor. */ 1093 PPGMPOOLPAGE pShwPde = pgmPoolGetPage(PGMCPU2PGM(pPGM)->CTX_SUFF(pPool), pPdpt->a[iPdpt].u & X86_PDPE_PG_MASK); 1094 PVM pVM = pVCpu->CTX_SUFF(pVM); 1095 PPGMPOOLPAGE pShwPde = pgmPoolGetPage(pVM->pgm.s.CTX_SUFF(pPool), pPdpt->a[iPdpt].u & X86_PDPE_PG_MASK); 1094 1096 AssertReturn(pShwPde, NULL); 1095 1097 1096 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR _BY_PGMCPU(pPGM, pShwPde);1098 return (PX86PDPAE)PGMPOOL_PAGE_2_PTR(pVM, pShwPde); 1097 1099 } 1098 1100 … … 1102 1104 * 1103 1105 * @returns PDE. 1104 * @param p PGM Pointer to the PGM instance data.1106 * @param pVCpu The current CPU. 1105 1107 * @param GCPtr The address. 1106 1108 */ 1107 DECLINLINE(X86PDEPAE) pgmShwGetPaePDE(P PGMCPU pPGM, RTGCPTR GCPtr)1108 { 1109 const unsigned iPd= (GCPtr >> X86_PD_PAE_SHIFT) & X86_PD_PAE_MASK;1110 1111 PX86PDPAE pShwPde = pgmShwGetPaePDPtr(p PGM, GCPtr);1109 DECLINLINE(X86PDEPAE) pgmShwGetPaePDE(PVMCPU pVCpu, RTGCPTR GCPtr) 1110 { 1111 const unsigned iPd = (GCPtr >> X86_PD_PAE_SHIFT) & X86_PD_PAE_MASK; 1112 1113 PX86PDPAE pShwPde = pgmShwGetPaePDPtr(pVCpu, GCPtr); 1112 1114 if (!pShwPde) 1113 1115 { … … 1123 1125 * 1124 1126 * @returns Pointer to the PDE. 1125 * @param p PGM Pointer to the PGM instance data.1127 * @param pVCpu The current CPU. 1126 1128 * @param GCPtr The address. 1127 */ 1128 DECLINLINE(PX86PDEPAE) pgmShwGetPaePDEPtr(PPGMCPU pPGM, RTGCPTR GCPtr) 1129 { 1130 const unsigned iPd = (GCPtr >> X86_PD_PAE_SHIFT) & X86_PD_PAE_MASK; 1131 1132 PX86PDPAE pPde = pgmShwGetPaePDPtr(pPGM, GCPtr); 1129 * @remarks Only used by AssertCR3. 1130 */ 1131 DECLINLINE(PX86PDEPAE) pgmShwGetPaePDEPtr(PVMCPU pVCpu, RTGCPTR GCPtr) 1132 { 1133 const unsigned iPd = (GCPtr >> X86_PD_PAE_SHIFT) & X86_PD_PAE_MASK; 1134 1135 PX86PDPAE pPde = pgmShwGetPaePDPtr(pVCpu, GCPtr); 1133 1136 AssertReturn(pPde, NULL); 1134 1137 return &pPde->a[iPd]; … … 1141 1144 * 1142 1145 * @returns Pointer to the shadow PML4. 1143 * @param p PGM Pointer to the PGM instance data.1144 */ 1145 DECLINLINE(PX86PML4) pgmShwGetLongModePML4Ptr(P PGMCPU pPGM)1146 { 1147 return (PX86PML4)PGMPOOL_PAGE_2_PTR _BY_PGMCPU(pPGM, pPGM->CTX_SUFF(pShwPageCR3));1146 * @param pVCpu The current CPU. 1147 */ 1148 DECLINLINE(PX86PML4) pgmShwGetLongModePML4Ptr(PVMCPU pVCpu) 1149 { 1150 return (PX86PML4)PGMPOOL_PAGE_2_PTR(pVCpu->CTX_SUFF(pVM), pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1148 1151 } 1149 1152 … … 1153 1156 * 1154 1157 * @returns The entry. 1155 * @param p PGM Pointer to the PGM instance data.1158 * @param pVCpu The current CPU. 1156 1159 * @param GCPtr The address. 1157 1160 */ 1158 DECLINLINE(X86PML4E) pgmShwGetLongModePML4E(P PGMCPU pPGM, RTGCPTR GCPtr)1161 DECLINLINE(X86PML4E) pgmShwGetLongModePML4E(PVMCPU pVCpu, RTGCPTR GCPtr) 1159 1162 { 1160 1163 const unsigned iPml4 = ((RTGCUINTPTR64)GCPtr >> X86_PML4_SHIFT) & X86_PML4_MASK; 1161 PX86PML4 pShwPml4 = pgmShwGetLongModePML4Ptr(p PGM);1164 PX86PML4 pShwPml4 = pgmShwGetLongModePML4Ptr(pVCpu); 1162 1165 1163 1166 if (!pShwPml4) … … 1174 1177 * 1175 1178 * @returns The entry. 1176 * @param p PGM Pointer to the PGM instance data.1179 * @param pVCpu The current CPU. 1177 1180 * @param iPml4 The PML4 index. 1178 1181 */ 1179 DECLINLINE(PX86PML4E) pgmShwGetLongModePML4EPtr(P PGMCPU pPGM, unsigned int iPml4)1180 { 1181 PX86PML4 pShwPml4 = pgmShwGetLongModePML4Ptr(p PGM);1182 DECLINLINE(PX86PML4E) pgmShwGetLongModePML4EPtr(PVMCPU pVCpu, unsigned int iPml4) 1183 { 1184 PX86PML4 pShwPml4 = pgmShwGetLongModePML4Ptr(pVCpu); 1182 1185 if (!pShwPml4) 1183 1186 return NULL; -
trunk/src/VBox/VMM/PGMInternal.h
r31141 r31167 2174 2174 #endif 2175 2175 2176 /** @def PGMPOOL_PAGE_2_PTR_BY_PGM2177 * Maps a pool page pool into the current context.2178 *2179 * @returns VBox status code.2180 * @param pPGM Pointer to the PGM instance data.2181 * @param pPage The pool page.2182 *2183 * @remark In RC this uses PGMGCDynMapHCPage(), so it will consume of the2184 * small page window employeed by that function. Be careful.2185 * @remark There is no need to assert on the result.2186 */2187 #if defined(IN_RC)2188 # define PGMPOOL_PAGE_2_PTR_BY_PGM(pPGM, pPage) pgmPoolMapPageInlined(pPGM, (pPage))2189 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)2190 # define PGMPOOL_PAGE_2_PTR_BY_PGM(pPGM, pPage) pgmPoolMapPageInlined(pPGM, (pPage))2191 #else2192 # define PGMPOOL_PAGE_2_PTR_BY_PGM(pPGM, pPage) PGMPOOL_PAGE_2_PTR(PGM2VM(pPGM), pPage)2193 #endif2194 2195 /** @def PGMPOOL_PAGE_2_PTR_BY_PGMCPU2196 * Maps a pool page pool into the current context.2197 *2198 * @returns VBox status code.2199 * @param pPGM Pointer to the PGMCPU instance data.2200 * @param pPage The pool page.2201 *2202 * @remark In RC this uses PGMGCDynMapHCPage(), so it will consume of the2203 * small page window employeed by that function. Be careful.2204 * @remark There is no need to assert on the result.2205 */2206 #if defined(IN_RC)2207 # define PGMPOOL_PAGE_2_PTR_BY_PGMCPU(pPGM, pPage) pgmPoolMapPageInlined(PGMCPU2PGM(pPGM), (pPage))2208 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)2209 # define PGMPOOL_PAGE_2_PTR_BY_PGMCPU(pPGM, pPage) pgmPoolMapPageInlined(PGMCPU2PGM(pPGM), (pPage))2210 #else2211 # define PGMPOOL_PAGE_2_PTR_BY_PGMCPU(pPGM, pPage) PGMPOOL_PAGE_2_PTR(PGMCPU2VM(pPGM), pPage)2212 #endif2213 2214 2176 2215 2177 /** @name Per guest page tracking data. -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r31123 r31167 69 69 *******************************************************************************/ 70 70 DECLINLINE(int) pgmShwGetLongModePDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PX86PML4E *ppPml4e, PX86PDPT *ppPdpt, PX86PDPAE *ppPD); 71 DECLINLINE(int) pgmShwGetPaePoolPagePD(P PGMCPU pPGM, RTGCPTR GCPtr, PPGMPOOLPAGE *ppShwPde);71 DECLINLINE(int) pgmShwGetPaePoolPagePD(PVMCPU pVCpu, RTGCPTR GCPtr, PPGMPOOLPAGE *ppShwPde); 72 72 #ifndef IN_RC 73 73 static int pgmShwSyncLongModePDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, X86PGPAEUINT uGstPml4e, X86PGPAEUINT uGstPdpe, PX86PDPAE *ppPD); … … 920 920 { 921 921 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE; 922 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr( &pVCpu->pgm.s);922 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(pVCpu); 923 923 PX86PDPE pPdpe = &pPdpt->a[iPdPt]; 924 924 PVM pVM = pVCpu->CTX_SUFF(pVM); … … 1010 1010 * 1011 1011 * @returns Pointer to the PDE. 1012 * @param p PGM Pointer to the PGMCPU instance data.1012 * @param pVCpu The current CPU. 1013 1013 * @param GCPtr The address. 1014 1014 * @param ppShwPde Receives the address of the pgm pool page for the shadow page directory 1015 1015 */ 1016 DECLINLINE(int) pgmShwGetPaePoolPagePD(P PGMCPU pPGM, RTGCPTR GCPtr, PPGMPOOLPAGE *ppShwPde)1016 DECLINLINE(int) pgmShwGetPaePoolPagePD(PVMCPU pVCpu, RTGCPTR GCPtr, PPGMPOOLPAGE *ppShwPde) 1017 1017 { 1018 1018 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE; 1019 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(pPGM); 1020 1021 Assert(PGMIsLockOwner(PGMCPU2VM(pPGM))); 1019 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(pVCpu); 1020 PVM pVM = pVCpu->CTX_SUFF(pVM); 1021 1022 Assert(PGMIsLockOwner(pVM)); 1022 1023 1023 1024 AssertReturn(pPdpt, VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT); /* can't happen */ … … 1030 1031 1031 1032 /* Fetch the pgm pool shadow descriptor. */ 1032 PPGMPOOLPAGE pShwPde = pgmPoolGetPage( PGMCPU2PGM(pPGM)->CTX_SUFF(pPool), pPdpt->a[iPdPt].u & X86_PDPE_PG_MASK);1033 PPGMPOOLPAGE pShwPde = pgmPoolGetPage(pVM->pgm.s.CTX_SUFF(pPool), pPdpt->a[iPdPt].u & X86_PDPE_PG_MASK); 1033 1034 AssertReturn(pShwPde, VERR_INTERNAL_ERROR); 1034 1035 … … 1060 1061 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 1061 1062 const unsigned iPml4 = (GCPtr >> X86_PML4_SHIFT) & X86_PML4_MASK; 1062 PX86PML4E pPml4e = pgmShwGetLongModePML4EPtr(p PGM, iPml4);1063 PX86PML4E pPml4e = pgmShwGetLongModePML4EPtr(pVCpu, iPml4); 1063 1064 bool fNestedPagingOrNoGstPaging = pVM->pgm.s.fNestedPaging || !CPUMIsGuestPagingEnabled(pVCpu); 1064 1065 PPGMPOOLPAGE pShwPage; … … 1159 1160 PPGMCPU pPGM = &pVCpu->pgm.s; 1160 1161 const unsigned iPml4 = (GCPtr >> X86_PML4_SHIFT) & X86_PML4_MASK; 1161 PCX86PML4E pPml4e = pgmShwGetLongModePML4EPtr(p PGM, iPml4);1162 PCX86PML4E pPml4e = pgmShwGetLongModePML4EPtr(pVCpu, iPml4); 1162 1163 1163 1164 Assert(PGMIsLockOwner(PGMCPU2VM(pPGM))); … … 1202 1203 static int pgmShwGetEPTPDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD) 1203 1204 { 1204 PPGMCPU pPGM = &pVCpu->pgm.s;1205 1205 PVM pVM = pVCpu->CTX_SUFF(pVM); 1206 1206 const unsigned iPml4 = (GCPtr >> EPT_PML4_SHIFT) & EPT_PML4_MASK; … … 1214 1214 Assert(PGMIsLockOwner(pVM)); 1215 1215 1216 pPml4 = (PEPTPML4)PGMPOOL_PAGE_2_PTR _BY_PGMCPU(pPGM, pPGM->CTX_SUFF(pShwPageCR3));1216 pPml4 = (PEPTPML4)PGMPOOL_PAGE_2_PTR(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1217 1217 Assert(pPml4); 1218 1218 -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r31141 r31167 511 511 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 512 512 const unsigned iPDDst = pvFault >> SHW_PD_SHIFT; 513 PX86PD pPDDst = pgmShwGet32BitPDPtr( &pVCpu->pgm.s);513 PX86PD pPDDst = pgmShwGet32BitPDPtr(pVCpu); 514 514 515 515 # elif PGM_SHW_TYPE == PGM_TYPE_PAE … … 1068 1068 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 1069 1069 const unsigned iPDDst = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK; 1070 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr( &pVCpu->pgm.s, GCPtrPage);1070 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 1071 1071 1072 1072 /* Fetch the pgm pool shadow descriptor. */ … … 1076 1076 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 1077 1077 const unsigned iPdpt = (GCPtrPage >> X86_PDPT_SHIFT); 1078 PX86PDPT pPdptDst = pgmShwGetPaePDPTPtr( &pVCpu->pgm.s);1078 PX86PDPT pPdptDst = pgmShwGetPaePDPTPtr(pVCpu); 1079 1079 1080 1080 /* If the shadow PDPE isn't present, then skip the invalidate. */ … … 1091 1091 1092 1092 /* Fetch the pgm pool shadow descriptor. */ 1093 rc = pgmShwGetPaePoolPagePD( &pVCpu->pgm.s, GCPtrPage, &pShwPde);1093 rc = pgmShwGetPaePoolPagePD(pVCpu, GCPtrPage, &pShwPde); 1094 1094 AssertRCSuccessReturn(rc, rc); 1095 1095 Assert(pShwPde); 1096 1096 1097 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPde);1097 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR(pVM, pShwPde); 1098 1098 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; 1099 1099 … … 1727 1727 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 1728 1728 const unsigned iPDDst = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK; 1729 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr( &pVCpu->pgm.s, GCPtrPage);1729 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 1730 1730 1731 1731 /* Fetch the pgm pool shadow descriptor. */ … … 1739 1739 1740 1740 /* Fetch the pgm pool shadow descriptor. */ 1741 int rc2 = pgmShwGetPaePoolPagePD( &pVCpu->pgm.s, GCPtrPage, &pShwPde);1741 int rc2 = pgmShwGetPaePoolPagePD(pVCpu, GCPtrPage, &pShwPde); 1742 1742 AssertRCSuccessReturn(rc2, rc2); 1743 1743 Assert(pShwPde); 1744 1744 1745 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPde);1745 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR(pVM, pShwPde); 1746 1746 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; 1747 1747 … … 2057 2057 */ 2058 2058 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 2059 X86PDE PdeDst = pgmShwGet32BitPDE( &pVCpu->pgm.s, GCPtrPage);2059 X86PDE PdeDst = pgmShwGet32BitPDE(pVCpu, GCPtrPage); 2060 2060 2061 2061 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 2062 X86PDEPAE PdeDst = pgmShwGetPaePDE( &pVCpu->pgm.s, GCPtrPage);2062 X86PDEPAE PdeDst = pgmShwGetPaePDE(pVCpu, GCPtrPage); 2063 2063 2064 2064 # elif PGM_SHW_TYPE == PGM_TYPE_AMD64 … … 2480 2480 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 2481 2481 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT; 2482 PSHWPDE pPdeDst = pgmShwGet32BitPDEPtr( &pVCpu->pgm.s, GCPtrPage);2482 PSHWPDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 2483 2483 2484 2484 /* Fetch the pgm pool shadow descriptor. */ … … 2493 2493 2494 2494 /* Fetch the pgm pool shadow descriptor. */ 2495 rc = pgmShwGetPaePoolPagePD( &pVCpu->pgm.s, GCPtrPage, &pShwPde);2495 rc = pgmShwGetPaePoolPagePD(pVCpu, GCPtrPage, &pShwPde); 2496 2496 AssertRCSuccessReturn(rc, rc); 2497 2497 Assert(pShwPde); 2498 2498 2499 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPde);2499 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR(pVM, pShwPde); 2500 2500 pPdeDst = &pPDDst->a[iPDDst]; 2501 2501 … … 2934 2934 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 2935 2935 const unsigned iPDDst = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK; 2936 PSHWPDE pPdeDst = pgmShwGet32BitPDEPtr( &pVCpu->pgm.s, GCPtrPage);2936 PSHWPDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 2937 2937 2938 2938 /* Fetch the pgm pool shadow descriptor. */ … … 2947 2947 2948 2948 /* Fetch the pgm pool shadow descriptor. */ 2949 rc = pgmShwGetPaePoolPagePD( &pVCpu->pgm.s, GCPtrPage, &pShwPde);2949 rc = pgmShwGetPaePoolPagePD(pVCpu, GCPtrPage, &pShwPde); 2950 2950 AssertRCSuccessReturn(rc, rc); 2951 2951 Assert(pShwPde); 2952 2952 2953 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPde);2953 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR(pVM, pShwPde); 2954 2954 pPdeDst = &pPDDst->a[iPDDst]; 2955 2955 … … 3172 3172 3173 3173 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 3174 const X86PDE PdeDst = pgmShwGet32BitPDE( &pVCpu->pgm.s, GCPtrPage);3174 const X86PDE PdeDst = pgmShwGet32BitPDE(pVCpu, GCPtrPage); 3175 3175 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 3176 3176 const unsigned iPDDst = ((GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK); … … 3334 3334 */ 3335 3335 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 3336 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr( &pVCpu->pgm.s, GCPtrPage);3336 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 3337 3337 3338 3338 # elif PGM_SHW_TYPE == PGM_TYPE_PAE … … 3656 3656 3657 3657 pPml4eSrc = pgmGstGetLongModePML4EPtr(pVCpu, iPml4); 3658 pPml4eDst = pgmShwGetLongModePML4EPtr( &pVCpu->pgm.s, iPml4);3658 pPml4eDst = pgmShwGetLongModePML4EPtr(pVCpu, iPml4); 3659 3659 3660 3660 /* Fetch the pgm pool shadow descriptor if the shadow pml4e is present. */ … … 3712 3712 X86PDPE PdpeSrc; 3713 3713 PGSTPD pPDSrc = pgmGstGetPaePDPtr(pVCpu, GCPtr, &iPDSrc, &PdpeSrc); 3714 PX86PDPT pPdptDst = pgmShwGetPaePDPTPtr( &pVCpu->pgm.s);3714 PX86PDPT pPdptDst = pgmShwGetPaePDPTPtr(pVCpu); 3715 3715 # else 3716 3716 PX86PML4E pPml4eSrcIgn; … … 3780 3780 GSTPD const *pPDSrc = pgmGstGet32bitPDPtr(pVCpu); 3781 3781 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 3782 PCX86PD pPDDst = pgmShwGet32BitPDPtr( &pVCpu->pgm.s);3782 PCX86PD pPDDst = pgmShwGet32BitPDPtr(pVCpu); 3783 3783 # endif 3784 3784 # endif /* PGM_GST_TYPE == PGM_TYPE_32BIT */ … … 3794 3794 { 3795 3795 # if PGM_SHW_TYPE == PGM_TYPE_PAE 3796 const SHWPDE PdeDst = *pgmShwGetPaePDEPtr(p PGM, GCPtr);3796 const SHWPDE PdeDst = *pgmShwGetPaePDEPtr(pVCpu, GCPtr); 3797 3797 # else 3798 3798 const SHWPDE PdeDst = pPDDst->a[iPDDst]; -
trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp
r31123 r31167 245 245 case PGMMODE_32_BIT: 246 246 { 247 PX86PD pShw32BitPd = pgmShwGet32BitPDPtr( &pVCpu->pgm.s);247 PX86PD pShw32BitPd = pgmShwGet32BitPDPtr(pVCpu); 248 248 AssertFatal(pShw32BitPd); 249 249 #ifdef IN_RC /* Lock mapping to prevent it from being reused during pgmPoolFree. */ … … 272 272 const uint32_t iPdPt = iNewPDE / 256; 273 273 unsigned iPaePde = iNewPDE * 2 % 512; 274 PX86PDPT pShwPdpt = pgmShwGetPaePDPTPtr( &pVCpu->pgm.s);274 PX86PDPT pShwPdpt = pgmShwGetPaePDPTPtr(pVCpu); 275 275 Assert(pShwPdpt); 276 276 #ifdef IN_RC /* Lock mapping to prevent it from being reused during pgmShwSyncPaePDPtr. */ … … 284 284 * accessed bit causes invalid VT-x guest state errors. 285 285 */ 286 PX86PDPAE pShwPaePd = pgmShwGetPaePDPtr( &pVCpu->pgm.s, iPdPt << X86_PDPT_SHIFT);286 PX86PDPAE pShwPaePd = pgmShwGetPaePDPtr(pVCpu, iPdPt << X86_PDPT_SHIFT); 287 287 if (!pShwPaePd) 288 288 { … … 407 407 && pShwPageCR3 != pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)) 408 408 { 409 pCurrentShwPdpt = pgmShwGetPaePDPTPtr( &pVCpu->pgm.s);409 pCurrentShwPdpt = pgmShwGetPaePDPTPtr(pVCpu); 410 410 #ifdef IN_RC /* Lock mapping to prevent it from being reused (currently not possible). */ 411 411 if (pCurrentShwPdpt) … … 426 426 case PGMMODE_32_BIT: 427 427 { 428 PX86PD pShw32BitPd = (PX86PD)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPageCR3);428 PX86PD pShw32BitPd = (PX86PD)PGMPOOL_PAGE_2_PTR(pVM, pShwPageCR3); 429 429 AssertFatal(pShw32BitPd); 430 430 … … 439 439 const unsigned iPdpt = iOldPDE / 256; /* iOldPDE * 2 / 512; iOldPDE is in 4 MB pages */ 440 440 unsigned iPaePde = iOldPDE * 2 % 512; 441 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPageCR3);442 PX86PDPAE pShwPaePd = pgmShwGetPaePDPtr( &pVCpu->pgm.s, pShwPdpt, (iPdpt << X86_PDPT_SHIFT));441 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR(pVM, pShwPageCR3); 442 PX86PDPAE pShwPaePd = pgmShwGetPaePDPtr(pVCpu, pShwPdpt, (iPdpt << X86_PDPT_SHIFT)); 443 443 444 444 /* … … 538 538 case PGMMODE_32_BIT: 539 539 { 540 PCX86PD pShw32BitPd = (PCX86PD)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPageCR3);540 PCX86PD pShw32BitPd = (PCX86PD)PGMPOOL_PAGE_2_PTR(pVM, pShwPageCR3); 541 541 AssertFatal(pShw32BitPd); 542 542 … … 553 553 const unsigned iPdpt = iPDE / 256; /* iPDE * 2 / 512; iPDE is in 4 MB pages */ 554 554 unsigned iPaePDE = iPDE * 2 % 512; 555 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR _BY_PGM(&pVM->pgm.s, pShwPageCR3);556 PCX86PDPAE pShwPaePd = pgmShwGetPaePDPtr( &pVCpu->pgm.s, pShwPdpt, iPdpt << X86_PDPT_SHIFT);555 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR(pVM, pShwPageCR3); 556 PCX86PDPAE pShwPaePd = pgmShwGetPaePDPtr(pVCpu, pShwPdpt, iPdpt << X86_PDPT_SHIFT); 557 557 AssertFatal(pShwPaePd); 558 558 -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r31069 r31167 151 151 152 152 /* PML4 */ 153 X86PML4E Pml4e = pgmShwGetLongModePML4E( &pVCpu->pgm.s, GCPtr);153 X86PML4E Pml4e = pgmShwGetLongModePML4E(pVCpu, GCPtr); 154 154 if (!Pml4e.n.u1Present) 155 155 return VERR_PAGE_TABLE_NOT_PRESENT; … … 180 180 181 181 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 182 X86PDEPAE Pde = pgmShwGetPaePDE( &pVCpu->pgm.s, GCPtr);182 X86PDEPAE Pde = pgmShwGetPaePDE(pVCpu, GCPtr); 183 183 184 184 # elif PGM_SHW_TYPE == PGM_TYPE_EPT … … 197 197 198 198 # else /* PGM_TYPE_32BIT */ 199 X86PDE Pde = pgmShwGet32BitPDE( &pVCpu->pgm.s, GCPtr);199 X86PDE Pde = pgmShwGet32BitPDE(pVCpu, GCPtr); 200 200 # endif 201 201 if (!Pde.n.u1Present) … … 317 317 X86PDEPAE Pde; 318 318 /* PML4 */ 319 X86PML4E Pml4e = pgmShwGetLongModePML4E( &pVCpu->pgm.s, GCPtr);319 X86PML4E Pml4e = pgmShwGetLongModePML4E(pVCpu, GCPtr); 320 320 if (!Pml4e.n.u1Present) 321 321 return VERR_PAGE_TABLE_NOT_PRESENT; … … 340 340 341 341 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 342 X86PDEPAE Pde = pgmShwGetPaePDE( &pVCpu->pgm.s, GCPtr);342 X86PDEPAE Pde = pgmShwGetPaePDE(pVCpu, GCPtr); 343 343 344 344 # elif PGM_SHW_TYPE == PGM_TYPE_EPT … … 357 357 358 358 # else /* PGM_TYPE_32BIT */ 359 X86PDE Pde = pgmShwGet32BitPDE( &pVCpu->pgm.s, GCPtr);359 X86PDE Pde = pgmShwGet32BitPDE(pVCpu, GCPtr); 360 360 # endif 361 361 if (!Pde.n.u1Present)
Note:
See TracChangeset
for help on using the changeset viewer.

