Changeset 31170 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jul 28, 2010 3:20:02 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64156
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r31167 r31170 1001 1001 pgmPoolCacheUsed(pPool, pShwPage); 1002 1002 } 1003 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1003 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1004 1004 return VINF_SUCCESS; 1005 1005 } … … 1105 1105 1106 1106 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64; 1107 PX86PDPT pPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1107 PX86PDPT pPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1108 1108 PX86PDPE pPdpe = &pPdpt->a[iPdPt]; 1109 1109 … … 1142 1142 | (uGstPdpe & ~(X86_PDPE_PG_MASK | X86_PDPE_AVL_MASK | X86_PDPE_PCD | X86_PDPE_PWT)); 1143 1143 1144 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1144 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1145 1145 return VINF_SUCCESS; 1146 1146 } … … 1179 1179 1180 1180 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64; 1181 PCX86PDPT pPdpt = *ppPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1181 PCX86PDPT pPdpt = *ppPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1182 1182 if (!pPdpt->a[iPdPt].n.u1Present) 1183 1183 return VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT; … … 1186 1186 AssertReturn(pShwPage, VERR_INTERNAL_ERROR); 1187 1187 1188 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1188 *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1189 1189 return VINF_SUCCESS; 1190 1190 } … … 1214 1214 Assert(PGMIsLockOwner(pVM)); 1215 1215 1216 pPml4 = (PEPTPML4)PGMPOOL_PAGE_2_PTR (pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3));1216 pPml4 = (PEPTPML4)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 1217 1217 Assert(pPml4); 1218 1218 … … 1242 1242 1243 1243 const unsigned iPdPt = (GCPtr >> EPT_PDPT_SHIFT) & EPT_PDPT_MASK; 1244 PEPTPDPT pPdpt = (PEPTPDPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1244 PEPTPDPT pPdpt = (PEPTPDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1245 1245 PEPTPDPTE pPdpe = &pPdpt->a[iPdPt]; 1246 1246 … … 1270 1270 pPdpe->n.u1Execute = 1; 1271 1271 1272 *ppPD = (PEPTPD)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1272 *ppPD = (PEPTPD)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1273 1273 return VINF_SUCCESS; 1274 1274 } … … 2289 2289 //Log(("PGMDynMapGCPage: GCPhys=%RGp pPage=%R[pgmpage]\n", GCPhys, pPage)); 2290 2290 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 2291 rc = pgmR0DynMapHCPageInlined( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage), ppv);2291 rc = pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), PGM_PAGE_GET_HCPHYS(pPage), ppv); 2292 2292 #else 2293 2293 rc = PGMDynMapHCPage(pVM, PGM_PAGE_GET_HCPHYS(pPage), ppv); -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r31167 r31170 1095 1095 Assert(pShwPde); 1096 1096 1097 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);1097 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 1098 1098 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; 1099 1099 … … 1232 1232 # if 0 /* likely cause of a major performance regression; must be SyncPageWorkerTrackDeref then */ 1233 1233 const unsigned iPTEDst = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK; 1234 PSHWPT pPT = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1234 PSHWPT pPT = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1235 1235 if (pPT->a[iPTEDst].n.u1Present) 1236 1236 { … … 1743 1743 Assert(pShwPde); 1744 1744 1745 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);1745 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 1746 1746 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; 1747 1747 … … 1820 1820 if (PdeSrc.n.u1Accessed) 1821 1821 { 1822 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);1822 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 1823 1823 if (!fBigPage) 1824 1824 { … … 2107 2107 2108 2108 PPGMPOOLPAGE pShwPage = pgmPoolGetPage(pPool, PdeDst.u & SHW_PDE_PG_MASK); 2109 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2109 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2110 2110 2111 2111 Assert(cPages == 1 || !(uErr & X86_TRAP_PF_P)); … … 2312 2312 if (pShwPage) 2313 2313 { 2314 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2314 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2315 2315 PSHWPTE pPteDst = &pPTDst->a[(GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK]; 2316 2316 if ( pPteDst->n.u1Present … … 2360 2360 if (pShwPage) 2361 2361 { 2362 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2362 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2363 2363 PSHWPTE pPteDst = &pPTDst->a[(GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK]; 2364 2364 if (pPteDst->n.u1Present) /** @todo Optimize accessed bit emulation? */ … … 2497 2497 Assert(pShwPde); 2498 2498 2499 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);2499 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 2500 2500 pPdeDst = &pPDDst->a[iPDDst]; 2501 2501 … … 2612 2612 } 2613 2613 if (rc == VINF_SUCCESS) 2614 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);2614 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 2615 2615 else if (rc == VINF_PGM_CACHED_PAGE) 2616 2616 { … … 2951 2951 Assert(pShwPde); 2952 2952 2953 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR (pVM, pShwPde);2953 pPDDst = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPde); 2954 2954 pPdeDst = &pPDDst->a[iPDDst]; 2955 2955 … … 3081 3081 if ( rc == VINF_SUCCESS 3082 3082 || rc == VINF_PGM_CACHED_PAGE) 3083 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR (pVM, pShwPage);3083 pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage); 3084 3084 else 3085 3085 AssertMsgFailedReturn(("rc=%Rrc\n", rc), VERR_INTERNAL_ERROR); … … 3821 3821 continue; 3822 3822 } 3823 const SHWPT *pPTDst = (const SHWPT *)PGMPOOL_PAGE_2_PTR (pVM, pPoolPage);3823 const SHWPT *pPTDst = (const SHWPT *)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pPoolPage); 3824 3824 3825 3825 if (PdeDst.u & (X86_PDE4M_PWT | X86_PDE4M_PCD)) -
trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp
r31167 r31170 426 426 case PGMMODE_32_BIT: 427 427 { 428 PX86PD pShw32BitPd = (PX86PD)PGMPOOL_PAGE_2_PTR (pVM, pShwPageCR3);428 PX86PD pShw32BitPd = (PX86PD)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, 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 (pVM, pShwPageCR3);441 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPageCR3); 442 442 PX86PDPAE pShwPaePd = pgmShwGetPaePDPtr(pVCpu, pShwPdpt, (iPdpt << X86_PDPT_SHIFT)); 443 443 … … 538 538 case PGMMODE_32_BIT: 539 539 { 540 PCX86PD pShw32BitPd = (PCX86PD)PGMPOOL_PAGE_2_PTR (pVM, pShwPageCR3);540 PCX86PD pShw32BitPd = (PCX86PD)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu2, 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 (pVM, pShwPageCR3);555 PX86PDPT pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPageCR3); 556 556 PCX86PDPAE pShwPaePd = pgmShwGetPaePDPtr(pVCpu, pShwPdpt, iPdpt << X86_PDPT_SHIFT); 557 557 AssertFatal(pShwPaePd); -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r31136 r31170 749 749 * Map it by HCPhys. 750 750 */ 751 return pgmR0DynMapHCPageInlined( &pVM->pgm.s, HCPhys, ppv);751 return pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), HCPhys, ppv); 752 752 753 753 #else … … 826 826 Assert(HCPhys != pVM->pgm.s.HCPhysZeroPg); 827 827 # ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 828 pgmR0DynMapHCPageInlined( &pVM->pgm.s, HCPhys, ppv);828 pgmR0DynMapHCPageInlined(VMMGetCpu(pVM), HCPhys, ppv); 829 829 # else 830 830 PGMDynMapHCPage(pVM, HCPhys, ppv); … … 1163 1163 */ 1164 1164 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1165 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK));1165 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); 1166 1166 #else 1167 1167 PPGMPAGEMAPTLBE pTlbe; … … 1201 1201 */ 1202 1202 #if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1203 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */1203 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */ 1204 1204 #else 1205 1205 PPGMPAGEMAPTLBE pTlbe; … … 1259 1259 if (RT_SUCCESS(rc)) 1260 1260 { 1261 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */1261 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */ 1262 1262 # if 0 1263 1263 pLock->pvMap = 0; … … 1370 1370 else 1371 1371 { 1372 *ppv = pgmDynMapHCPageOff( &pVM->pgm.s, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */1372 *ppv = pgmDynMapHCPageOff(pVM, PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK)); /** @todo add a read only flag? */ 1373 1373 # if 0 1374 1374 pLock->pvMap = 0; -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r31123 r31170 102 102 DECLINLINE(void *) PGMPOOL_PAGE_2_LOCKED_PTR(PVM pVM, PPGMPOOLPAGE pPage) 103 103 { 104 void *pv = pgmPoolMapPageInlined( &pVM->pgm.s, pPage);104 void *pv = pgmPoolMapPageInlined(pVM, pPage); 105 105 106 106 /* Make sure the dynamic mapping will not be reused. */
Note:
See TracChangeset
for help on using the changeset viewer.