VirtualBox

Changeset 20129 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 28, 2009 3:55:42 PM (16 years ago)
Author:
vboxsync
Message:

Backed out 47892-5

Location:
trunk/src/VBox/VMM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMBth.h

    r20125 r20129  
    167167
    168168    /* contruct a fake address. */
    169     GCPhysCR3 = PGMPOOL_PHYS_NON_PAGED;
     169    GCPhysCR3 = RT_BIT_64(63);
    170170    pVCpu->pgm.s.iShwUser      = SHW_POOL_ROOT_IDX;
    171171    pVCpu->pgm.s.iShwUserTable = GCPhysCR3 >> PAGE_SHIFT;
  • trunk/src/VBox/VMM/PGMInternal.h

    r20125 r20129  
    186186#endif
    187187
    188 /** @} */
    189 
    190 /** @name PGM pool physical address flags
    191  *
    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. */
    197188/** @} */
    198189
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r20125 r20129  
    32333233            else
    32343234            {
    3235                 /* Temporarily disabled physical handler(s), since the recompiler
    3236                    doesn't get notified when it's reset we'll have to pretend it's
     3235                /* Temporariliy disabled phycial handler(s), since the recompiler
     3236                   doesn't get notified when it's reset we'll have to pretend its
    32373237                   operating normally. */
    32383238                if (pgmHandlerPhysicalIsAll(pVM, GCPhys))
     
    32663266            *ppv = (void *)((uintptr_t)pTlbe->pv | (GCPhys & PAGE_OFFSET_MASK));
    32673267            /** @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. */
    32693269
    32703270            Log6(("PGMR3PhysTlbGCPhys2Ptr: GCPhys=%RGp rc=%Rrc pPage=%R[pgmpage] *ppv=%p\n", GCPhys, rc, pPage, *ppv));
  • trunk/src/VBox/VMM/PGMShw.h

    r20125 r20129  
    180180{
    181181#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);
    183183    PPGMPOOLPAGE pNewShwPageCR3;
    184184    PVM          pVM       = pVCpu->pVMR3;
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r20128 r20129  
    11881188    if (PdeSrc.n.u1Present)
    11891189    {
    1190 # ifndef PGM_WITHOUT_MAPPING
    11911190        if (PdeDst.u & PGM_PDFLAGS_MAPPING)
    11921191        {
     
    12001199            pgmUnlock(pVM);
    12011200        }
    1202         else
    1203 # endif /* !PGM_WITHOUT_MAPPING */
    1204              if (   PdeSrc.n.u1User != PdeDst.n.u1User
     1201        else if (   PdeSrc.n.u1User != PdeDst.n.u1User
    12051202                 || (!PdeSrc.n.u1Write && PdeDst.n.u1Write))
    12061203        {
     
    25972594            GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT);
    25982595# 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 
    26052596            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);
    26092597        }
    26102598        if (rc == VINF_SUCCESS)
     
    33433331#endif /* PGM_GST_TYPE != PGM_TYPE_32BIT */
    33443332}
     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 */
     3344DECLINLINE(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
    33453377
    33463378#undef MY_STAM_COUNTER_INC
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette