Changeset 20762 in vbox
- Timestamp:
- Jun 22, 2009 11:06:56 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48882
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/VMM/VMMAll/PGMAll.cpp ¶
r20671 r20762 873 873 int rc; 874 874 875 Assert(PGMIsLockOwner(pVM)); 876 875 877 /* Allocate page directory if not present. */ 876 878 if ( !pPdpe->n.u1Present … … 964 966 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE; 965 967 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(pPGM); 968 969 Assert(PGMIsLockOwner(PGMCPU2VM(pPGM))); 970 966 971 AssertReturn(pPdpt, VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT); /* can't happen */ 967 972 if (!pPdpt->a[iPdPt].n.u1Present) … … 1009 1014 int rc; 1010 1015 1016 Assert(PGMIsLockOwner(pVM)); 1017 1011 1018 /* Allocate page directory pointer table if not present. */ 1012 1019 if ( !pPml4e->n.u1Present … … 1106 1113 const unsigned iPml4 = (GCPtr >> X86_PML4_SHIFT) & X86_PML4_MASK; 1107 1114 PCX86PML4E pPml4e = pgmShwGetLongModePML4EPtr(pPGM, iPml4); 1115 1116 Assert(PGMIsLockOwner(PGMCPU2VM(pPGM))); 1117 1108 1118 AssertReturn(pPml4e, VERR_INTERNAL_ERROR); 1109 1119 if (ppPml4e) … … 1155 1165 1156 1166 Assert(HWACCMIsNestedPagingActive(pVM)); 1167 Assert(PGMIsLockOwner(pVM)); 1157 1168 1158 1169 pPml4 = (PEPTPML4)PGMPOOL_PAGE_2_PTR_BY_PGMCPU(pPGM, pPGM->CTX_SUFF(pShwPageCR3)); -
TabularUnified trunk/src/VBox/VMM/VMMAll/PGMAllBth.h ¶
r20684 r20762 4343 4343 PPGMPOOLPAGE pNewShwPageCR3; 4344 4344 4345 pgmLock(pVM); 4346 4345 4347 Assert(!(GCPhysCR3 >> (PAGE_SHIFT + 32))); 4346 rc = pgmPoolAlloc(pVM, GCPhysCR3 & GST_CR3_PAGE_MASK, BTH_PGMPOOLKIND_ROOT, SHW_POOL_ROOT_IDX, GCPhysCR3 >> PAGE_SHIFT, &pNewShwPageCR3 );4348 rc = pgmPoolAlloc(pVM, GCPhysCR3 & GST_CR3_PAGE_MASK, BTH_PGMPOOLKIND_ROOT, SHW_POOL_ROOT_IDX, GCPhysCR3 >> PAGE_SHIFT, &pNewShwPageCR3, true /* lock page */); 4347 4349 AssertFatalRC(rc); 4348 4350 rc = VINF_SUCCESS; 4349 4350 /* Mark the page as locked; disallow flushing. */4351 pgmPoolLockPage(pPool, pNewShwPageCR3);4352 4351 4353 4352 # ifdef IN_RC 4354 4353 /* NOTE: We can't deal with jumps to ring 3 here as we're now in an inconsistent state! */ 4355 4354 bool fLog = VMMGCLogDisable(pVM); 4356 pgmLock(pVM);4357 4355 # endif 4358 4356 … … 4389 4387 4390 4388 # ifdef IN_RC 4391 pgmUnlock(pVM);4392 4389 VMMGCLogRestore(pVM, fLog); 4393 4390 # endif … … 4406 4403 pgmPoolFreeByPage(pPool, pOldShwPageCR3, iOldShwUser, iOldShwUserTable); 4407 4404 } 4408 4405 pgmUnlock(pVM); 4409 4406 # endif 4410 4407 … … 4473 4470 # endif 4474 4471 4472 pgmLock(pVM); 4473 4475 4474 # ifndef PGM_WITHOUT_MAPPINGS 4476 4475 if (pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)) … … 4495 4494 pVCpu->pgm.s.iShwUserTable = 0; 4496 4495 } 4496 pgmUnlock(pVM); 4497 4497 # endif 4498 4498 #endif /* !IN_RC*/ -
TabularUnified trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp ¶
r20758 r20762 4055 4055 * @param iUserTable The index into the user table (shadowed). 4056 4056 * @param ppPage Where to store the pointer to the page. NULL is stored here on failure. 4057 */ 4058 int pgmPoolAllocEx(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, PGMPOOLACCESS enmAccess, uint16_t iUser, uint32_t iUserTable, PPPGMPOOLPAGE ppPage) 4057 * @param fLockPage Lock the page 4058 */ 4059 int pgmPoolAllocEx(PVM pVM, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, PGMPOOLACCESS enmAccess, uint16_t iUser, uint32_t iUserTable, PPPGMPOOLPAGE ppPage, bool fLockPage) 4059 4060 { 4060 4061 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); … … 4074 4075 if (RT_SUCCESS(rc2)) 4075 4076 { 4077 if (fLockPage) 4078 pgmPoolLockPage(pPool, *ppPage); 4076 4079 pgmUnlock(pVM); 4077 4080 STAM_PROFILE_ADV_STOP(&pPool->StatAlloc, a); … … 4164 4167 4165 4168 *ppPage = pPage; 4169 if (fLockPage) 4170 pgmPoolLockPage(pPool, pPage); 4166 4171 pgmUnlock(pVM); 4167 4172 LogFlow(("pgmPoolAlloc: returns %Rrc *ppPage=%p:{.Key=%RHp, .idx=%d, .fCached=%RTbool, .fMonitored=%RTbool}\n",
Note:
See TracChangeset
for help on using the changeset viewer.