Changeset 20129 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 28, 2009 3:55:42 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMBth.h
r20125 r20129 167 167 168 168 /* contruct a fake address. */ 169 GCPhysCR3 = PGMPOOL_PHYS_NON_PAGED;169 GCPhysCR3 = RT_BIT_64(63); 170 170 pVCpu->pgm.s.iShwUser = SHW_POOL_ROOT_IDX; 171 171 pVCpu->pgm.s.iShwUserTable = GCPhysCR3 >> PAGE_SHIFT; -
trunk/src/VBox/VMM/PGMInternal.h
r20125 r20129 186 186 #endif 187 187 188 /** @} */189 190 /** @name PGM pool physical address flags191 *192 * These are bit markers for PGM pool physical addresses.193 * @{ */194 #define PGMPOOL_PHYS_NON_PAGED RT_BIT_64(63)195 #define PGMPOOL_PHYS_ACCESS_USER RT_BIT_64(62) /* set = user, cleared = supervisor */196 #define PGMPOOL_PHYS_ACCESS_RW RT_BIT_64(61) /* set = read/write, cleared = read-only. */197 188 /** @} */ 198 189 -
trunk/src/VBox/VMM/PGMPhys.cpp
r20125 r20129 3233 3233 else 3234 3234 { 3235 /* Temporaril y disabled physical handler(s), since the recompiler3236 doesn't get notified when it's reset we'll have to pretend it 's3235 /* Temporariliy disabled phycial handler(s), since the recompiler 3236 doesn't get notified when it's reset we'll have to pretend its 3237 3237 operating normally. */ 3238 3238 if (pgmHandlerPhysicalIsAll(pVM, GCPhys)) … … 3266 3266 *ppv = (void *)((uintptr_t)pTlbe->pv | (GCPhys & PAGE_OFFSET_MASK)); 3267 3267 /** @todo mapping/locking hell; this isn't horribly efficient since 3268 * pgmPhysPageLoadIntoTlb will repeat the lookup we've done here. */3268 * pgmPhysPageLoadIntoTlb will repeate the lookup we've done here. */ 3269 3269 3270 3270 Log6(("PGMR3PhysTlbGCPhys2Ptr: GCPhys=%RGp rc=%Rrc pPage=%R[pgmpage] *ppv=%p\n", GCPhys, rc, pPage, *ppv)); -
trunk/src/VBox/VMM/PGMShw.h
r20125 r20129 180 180 { 181 181 #if PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT 182 RTGCPHYS GCPhysCR3 = PGMPOOL_PHYS_NON_PAGED;182 RTGCPHYS GCPhysCR3 = RT_BIT_64(63); 183 183 PPGMPOOLPAGE pNewShwPageCR3; 184 184 PVM pVM = pVCpu->pVMR3; -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r20128 r20129 1188 1188 if (PdeSrc.n.u1Present) 1189 1189 { 1190 # ifndef PGM_WITHOUT_MAPPING1191 1190 if (PdeDst.u & PGM_PDFLAGS_MAPPING) 1192 1191 { … … 1200 1199 pgmUnlock(pVM); 1201 1200 } 1202 else 1203 # endif /* !PGM_WITHOUT_MAPPING */ 1204 if ( PdeSrc.n.u1User != PdeDst.n.u1User 1201 else if ( PdeSrc.n.u1User != PdeDst.n.u1User 1205 1202 || (!PdeSrc.n.u1Write && PdeDst.n.u1Write)) 1206 1203 { … … 2597 2594 GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT); 2598 2595 # endif 2599 /* Modify the physical address to distinguish between different access types to prevent incorrect reuse of cached entries. */2600 if (PdeSrc.n.u1Write)2601 GCPhys |= PGMPOOL_PHYS_ACCESS_RW;2602 if (PdeSrc.n.u1User)2603 GCPhys |= PGMPOOL_PHYS_ACCESS_USER;2604 2605 2596 rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_BIG, pShwPde->idx, iPDDst, &pShwPage); 2606 2607 /* Strip the flags again in case we have to construct it. */2608 GCPhys &= ~(PGMPOOL_PHYS_ACCESS_RW|PGMPOOL_PHYS_ACCESS_USER);2609 2597 } 2610 2598 if (rc == VINF_SUCCESS) … … 3343 3331 #endif /* PGM_GST_TYPE != PGM_TYPE_32BIT */ 3344 3332 } 3333 3334 3335 #if PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64 3336 # if PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_PAE || PGM_SHW_TYPE == PGM_TYPE_AMD64 3337 /** 3338 * Figures out which kind of shadow page this guest PDE warrants. 3339 * 3340 * @returns Shadow page kind. 3341 * @param pPdeSrc The guest PDE in question. 3342 * @param cr4 The current guest cr4 value. 3343 */ 3344 DECLINLINE(PGMPOOLKIND) PGM_BTH_NAME(CalcPageKind)(const GSTPDE *pPdeSrc, uint32_t cr4) 3345 { 3346 # if PMG_GST_TYPE == PGM_TYPE_AMD64 3347 if (!pPdeSrc->n.u1Size) 3348 # else 3349 if (!pPdeSrc->n.u1Size || !(cr4 & X86_CR4_PSE)) 3350 # endif 3351 return BTH_PGMPOOLKIND_PT_FOR_PT; 3352 //switch (pPdeSrc->u & (X86_PDE4M_RW | X86_PDE4M_US /*| X86_PDE4M_PAE_NX*/)) 3353 //{ 3354 // case 0: 3355 // return BTH_PGMPOOLKIND_PT_FOR_BIG_RO; 3356 // case X86_PDE4M_RW: 3357 // return BTH_PGMPOOLKIND_PT_FOR_BIG_RW; 3358 // case X86_PDE4M_US: 3359 // return BTH_PGMPOOLKIND_PT_FOR_BIG_US; 3360 // case X86_PDE4M_RW | X86_PDE4M_US: 3361 // return BTH_PGMPOOLKIND_PT_FOR_BIG_RW_US; 3362 # if 0 3363 // case X86_PDE4M_PAE_NX: 3364 // return BTH_PGMPOOLKIND_PT_FOR_BIG_NX; 3365 // case X86_PDE4M_RW | X86_PDE4M_PAE_NX: 3366 // return BTH_PGMPOOLKIND_PT_FOR_BIG_RW_NX; 3367 // case X86_PDE4M_US | X86_PDE4M_PAE_NX: 3368 // return BTH_PGMPOOLKIND_PT_FOR_BIG_US_NX; 3369 // case X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PAE_NX: 3370 // return BTH_PGMPOOLKIND_PT_FOR_BIG_RW_US_NX; 3371 # endif 3372 return BTH_PGMPOOLKIND_PT_FOR_BIG; 3373 //} 3374 } 3375 # endif 3376 #endif 3345 3377 3346 3378 #undef MY_STAM_COUNTER_INC
Note:
See TracChangeset
for help on using the changeset viewer.