VirtualBox

Ignore:
Timestamp:
Nov 11, 2008 6:07:03 PM (16 years ago)
Author:
vboxsync
Message:

#1865: shadow pae, the seventh wave.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r14102 r14103  
    31763176#  else /* PGM_SHW_TYPE == PGM_TYPE_PAE */
    31773177#   if PGM_GST_TYPE == PGM_TYPE_32BIT
    3178     PX86PDEPAE  pPDEDst = &pVM->pgm.s.CTXMID(ap,PaePDs)[0]->a[0];
     3178    PX86PDEPAE  pPDEDst = NULL;
    31793179#   endif
    31803180#  endif
     
    32153215        PGSTPD          pPDSrc    = pgmGstGetPaePDPtr(&pVM->pgm.s, iPdpt << X86_PDPT_SHIFT, &iPDSrc, &PdpeSrc);
    32163216        PX86PDPAE       pPDPAE    = pVM->pgm.s.CTXMID(ap,PaePDs)[0];
    3217         PX86PDEPAE      pPDEDst   = &pPDPAE->a[iPdpt * X86_PG_PAE_ENTRIES];
     3217        PX86PDEPAE      pPDEDst   = pgmShwGetPaePDEPtr(&pVM->pgm.s, iPdpt << X86_PDPT_SHIFT);
    32183218        PX86PDPT        pPdptDst  = pgmShwGetPaePDPTPtr(&pVM->pgm.s);
    32193219
     
    32443244        for (unsigned iPD = 0; iPD < RT_ELEMENTS(pPDSrc->a); iPD++)
    32453245        {
     3246#  if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
     3247            if (!(iPD & (X86_PG_PAE_ENTRIES - 1))) /* Start of new PD. */
     3248                pPDEDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, (uint32_t)iPD << GST_PD_SHIFT);
     3249#  endif
    32463250#  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    32473251            Assert(&pVM->pgm.s.CTXMID(p,32BitPD)->a[iPD] == pPDEDst);
     
    32773281                        const unsigned cPTs = pMapping->cb >> GST_PD_SHIFT;
    32783282                        iPD += cPTs - 1;
    3279                         pPDEDst += cPTs + (PGM_GST_TYPE != PGM_SHW_TYPE) * cPTs;    /* Only applies to the pae shadow and 32 bits guest case */
     3283#   if PGM_SHW_TYPE != PGM_GST_TYPE /* SHW==PAE && GST==32BIT */
     3284                        pPDEDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, (uint32_t)(iPD + 1) << GST_PD_SHIFT);
     3285#   else
     3286                        pPDEDst += cPTs;
     3287                        /** @todo Assert on / deal with  cross PD mappings in PAE/PAE mode! */
     3288#   endif
    32803289                        pMapping = pMapping->CTX_SUFF(pNext);
    32813290                        iPdNoMapping = pMapping ? pMapping->GCPtr >> GST_PD_SHIFT : ~0U;
     
    34833492                /* advance. */
    34843493                iPD += cPTs - 1;
    3485                 pPDEDst += cPTs + (PGM_GST_TYPE != PGM_SHW_TYPE) * cPTs;    /* Only applies to the pae shadow and 32 bits guest case */
     3494#   if PGM_SHW_TYPE != PGM_GST_TYPE /* SHW==PAE && GST==32BIT */
     3495                pPDEDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, (uint32_t)(iPD + 1) << GST_PD_SHIFT);
     3496#   else
     3497                pPDEDst += cPTs;
     3498                /** @todo Assert on / deal with  cross PD mappings in PAE/PAE mode! */
     3499#   endif
    34863500#   if PGM_GST_TYPE != PGM_SHW_TYPE
    34873501                AssertCompile(PGM_GST_TYPE == PGM_TYPE_32BIT && PGM_SHW_TYPE == PGM_TYPE_PAE);
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