VirtualBox

Changeset 14147 in vbox


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

#1865: PGM - 32-bit shadown PD pointer converted.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r14133 r14147  
    14121412     * As with the intermediate context, AMD64 uses the PAE PDPT and PDs.
    14131413     */
    1414     pVM->pgm.s.pHC32BitPD    = (PX86PD)MMR3PageAllocLow(pVM);
     1414    pVM->pgm.s.pShw32BitPdR3    = (PX86PD)MMR3PageAllocLow(pVM);
     1415#ifndef VBOX_WITH_2X_4GB_ADDR_SPACE
     1416    pVM->pgm.s.pShw32BitPdR0    = (uintptr_t)pVM->pgm.s.pShw32BitPdR3;
     1417#endif
    14151418    pVM->pgm.s.apShwPaePDsR3[0] = (PX86PDPAE)MMR3PageAlloc(pVM);
    14161419    pVM->pgm.s.apShwPaePDsR3[1] = (PX86PDPAE)MMR3PageAlloc(pVM);
     
    14351438#endif
    14361439
    1437     if (    !pVM->pgm.s.pHC32BitPD
     1440    if (    !pVM->pgm.s.pShw32BitPdR3
    14381441        ||  !pVM->pgm.s.apShwPaePDsR3[0]
    14391442        ||  !pVM->pgm.s.apShwPaePDsR3[1]
     
    14481451
    14491452    /* get physical addresses. */
    1450     pVM->pgm.s.HCPhys32BitPD    = MMPage2Phys(pVM, pVM->pgm.s.pHC32BitPD);
    1451     Assert(MMPagePhys2Page(pVM, pVM->pgm.s.HCPhys32BitPD) == pVM->pgm.s.pHC32BitPD);
     1453    pVM->pgm.s.HCPhys32BitPD    = MMPage2Phys(pVM, pVM->pgm.s.pShw32BitPdR3);
     1454    Assert(MMPagePhys2Page(pVM, pVM->pgm.s.HCPhys32BitPD) == pVM->pgm.s.pShw32BitPdR3);
    14521455    pVM->pgm.s.aHCPhysPaePDs[0] = MMPage2Phys(pVM, pVM->pgm.s.apShwPaePDsR3[0]);
    14531456    pVM->pgm.s.aHCPhysPaePDs[1] = MMPage2Phys(pVM, pVM->pgm.s.apShwPaePDsR3[1]);
     
    14601463     * Initialize the pages, setting up the PML4 and PDPT for action below 4GB.
    14611464     */
    1462     ASMMemZero32(pVM->pgm.s.pHC32BitPD, PAGE_SIZE);
     1465    ASMMemZero32(pVM->pgm.s.pShw32BitPdR3, PAGE_SIZE);
    14631466    ASMMemZero32(pVM->pgm.s.pShwPaePdptR3, PAGE_SIZE);
    14641467    ASMMemZero32(pVM->pgm.s.pShwNestedRootR3, PAGE_SIZE);
     
    17731776    int rc = MMR3HyperReserve(pVM, PAGE_SIZE * (2 + RT_ELEMENTS(pVM->pgm.s.apShwPaePDsR3) + 1 + 2 + 2), "Paging", &GCPtr);
    17741777    AssertRCReturn(rc, rc);
    1775     pVM->pgm.s.pGC32BitPD = GCPtr;
     1778    pVM->pgm.s.pShw32BitPdRC = GCPtr;
    17761779    MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL);
    17771780
     
    18101813     * Map the paging pages into the guest context.
    18111814     */
    1812     RTGCPTR GCPtr = pVM->pgm.s.pGC32BitPD;
     1815    RTGCPTR GCPtr = pVM->pgm.s.pShw32BitPdRC;
    18131816    AssertReleaseReturn(GCPtr, VERR_INTERNAL_ERROR);
    18141817
    18151818    int rc = PGMMap(pVM, GCPtr, pVM->pgm.s.HCPhys32BitPD, PAGE_SIZE, 0);
    18161819    AssertRCReturn(rc, rc);
    1817     pVM->pgm.s.pGC32BitPD = GCPtr;
     1820    pVM->pgm.s.pShw32BitPdRC = GCPtr;
    18181821    GCPtr += PAGE_SIZE;
    18191822    GCPtr += PAGE_SIZE; /* reserved page */
     
    19001903    pVM->pgm.s.GCPtrCR3Mapping += offDelta;
    19011904    /** @todo move this into shadow and guest specific relocation functions. */
    1902     AssertMsg(pVM->pgm.s.pGC32BitPD, ("Init order, no relocation before paging is initialized!\n"));
    1903     pVM->pgm.s.pGC32BitPD    += offDelta;
     1905    AssertMsg(pVM->pgm.s.pShw32BitPdR3, ("Init order, no relocation before paging is initialized!\n"));
     1906    pVM->pgm.s.pShw32BitPdRC += offDelta;
    19041907    pVM->pgm.s.pGuestPDRC    += offDelta;
    19051908    AssertCompile(RT_ELEMENTS(pVM->pgm.s.apShwPaePDsRC) == RT_ELEMENTS(pVM->pgm.s.apGstPaePDsRC));
  • trunk/src/VBox/VMM/PGMInternal.h

    r14146 r14147  
    20422042    /** @name 32-bit Shadow Paging
    20432043     * @{ */
    2044     /** The 32-Bit PD - HC Ptr. */
    2045 #if 0///@todo def VBOX_WITH_2X_4GB_ADDR_SPACE
    2046     R3PTRTYPE(PX86PD)               pHC32BitPD;
    2047 #else
    2048     R3R0PTRTYPE(PX86PD)             pHC32BitPD;
    2049 #endif
    2050     /** The 32-Bit PD - GC Ptr. */
    2051     RCPTRTYPE(PX86PD)               pGC32BitPD;
     2044    /** The 32-Bit PD - R3 Ptr. */
     2045    R3PTRTYPE(PX86PD)               pShw32BitPdR3;
     2046    /** The 32-Bit PD - R0 Ptr. */
     2047    R0PTRTYPE(PX86PD)               pShw32BitPdR0;
     2048    /** The 32-Bit PD - RC Ptr. */
     2049    RCPTRTYPE(PX86PD)               pShw32BitPdRC;
    20522050#if HC_ARCH_BITS == 64
    20532051    uint32_t                        u32Padding1; /**< alignment padding. */
     
    38033801#endif /* !IN_RC */
    38043802
     3803
     3804/**
     3805 * Gets the shadow page directory, 32-bit.
     3806 *
     3807 * @returns Pointer to the shadow 32-bit PD.
     3808 * @param   pPGM        Pointer to the PGM instance data.
     3809 */
     3810DECLINLINE(PX86PD) pgmShwGet32BitPDPtr(PPGM pPGM)
     3811{
     3812#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0
     3813    PX86PD          pShwPd;
     3814    Assert(pPGM->HCPhys32BitPD != 0 && pPGM->HCPhys32BitPD != NIL_RTHCPHYS);
     3815    int rc = PGM_HCPHYS_2_PTR(PGM2VM(pPGM), pPGM->HCPhys32BitPD, &pShwPd);
     3816    AssertRCReturn(rc, NULL);
     3817    return pShwPd;
     3818#else
     3819    return pPGM->CTX_SUFF(pShw32BitPd);
     3820#endif
     3821}
     3822
     3823
     3824/**
     3825 * Gets the shadow page directory entry for the specified address, 32-bit.
     3826 *
     3827 * @returns Shadow 32-bit PDE.
     3828 * @param   pPGM        Pointer to the PGM instance data.
     3829 * @param   GCPtr       The address.
     3830 */
     3831DECLINLINE(X86PDE) pgmShwGet32BitPDE(PPGM pPGM, RTGCPTR GCPtr)
     3832{
     3833    const unsigned  iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK;
     3834#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0
     3835    PCX86PD         pShwPd;
     3836    Assert(pPGM->HCPhys32BitPD != 0 && pPGM->HCPhys32BitPD != NIL_RTHCPHYS);
     3837    int rc = PGM_HCPHYS_2_PTR(PGM2VM(pPGM), pPGM->HCPhys32BitPD, &pShwPd);
     3838    if (RT_FAILURE(rc))
     3839    {
     3840        X86PDE ZeroPde = {0};
     3841        AssertMsgFailedReturn(("%Rrc\n", rc), ZeroPde);
     3842    }
     3843    return pShwPd->a[iPd];
     3844#else
     3845    return pPGM->CTX_SUFF(pShw32BitPd)->a[iPd];
     3846#endif
     3847}
     3848
     3849
     3850/**
     3851 * Gets the pointer to the shadow page directory entry for the specified
     3852 * address, 32-bit.
     3853 *
     3854 * @returns Pointer to the shadow 32-bit PDE.
     3855 * @param   pPGM        Pointer to the PGM instance data.
     3856 * @param   GCPtr       The address.
     3857 */
     3858DECLINLINE(PX86PDE) pgmShwGet32BitPDEPtr(PPGM pPGM, RTGCPTR GCPtr)
     3859{
     3860    const unsigned  iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK;
     3861#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0
     3862    PX86PD          pShwPd;
     3863    Assert(pPGM->HCPhys32BitPD != 0 && pPGM->HCPhys32BitPD != NIL_RTHCPHYS);
     3864    int rc = PGM_HCPHYS_2_PTR(PGM2VM(pPGM), pPGM->HCPhys32BitPD, &pShwPd);
     3865    AssertRCReturn(rc, NULL);
     3866    return &pShwPd->a[iPd];
     3867#else
     3868    return &pPGM->CTX_SUFF(pShw32BitPd)->a[iPd];
     3869#endif
     3870}
     3871
     3872
    38053873/**
    38063874 * Gets the shadow page pointer table, PAE.
  • trunk/src/VBox/VMM/PGMMap.cpp

    r14145 r14147  
    6161{
    6262    LogFlow(("PGMR3MapPT: GCPtr=%#x cb=%d pfnRelocate=%p pvUser=%p pszDesc=%s\n", GCPtr, cb, pfnRelocate, pvUser, pszDesc));
    63     AssertMsg(pVM->pgm.s.pInterPD && pVM->pgm.s.pHC32BitPD, ("Paging isn't initialized, init order problems!\n"));
     63    AssertMsg(pVM->pgm.s.pInterPD && pVM->pgm.s.pShw32BitPdR3, ("Paging isn't initialized, init order problems!\n"));
    6464
    6565    /*
     
    722722         * 32-bit.
    723723         */
    724         pPGM->pInterPD->a[iOldPDE].u   = 0;
    725         pPGM->pHC32BitPD->a[iOldPDE].u = 0;
     724        pPGM->pInterPD->a[iOldPDE].u        = 0;
     725        pPGM->pShw32BitPdR3->a[iOldPDE].u  = 0;
    726726
    727727        /*
     
    771771         * 32-bit.
    772772         */
    773         if (pPGM->pHC32BitPD->a[iNewPDE].n.u1Present)
    774             pgmPoolFree(pVM, pPGM->pHC32BitPD->a[iNewPDE].u & X86_PDE_PG_MASK, PGMPOOL_IDX_PD, iNewPDE);
     773        if (pPGM->pShw32BitPdR3->a[iNewPDE].n.u1Present)
     774            pgmPoolFree(pVM, pPGM->pShw32BitPdR3->a[iNewPDE].u & X86_PDE_PG_MASK, PGMPOOL_IDX_PD, iNewPDE);
    775775        X86PDE Pde;
    776776        /* Default mapping page directory flags are read/write and supervisor; individual page attributes determine the final flags */
    777777        Pde.u = PGM_PDFLAGS_MAPPING | X86_PDE_P | X86_PDE_A | X86_PDE_RW | X86_PDE_US | (uint32_t)pMap->aPTs[i].HCPhysPT;
    778         pPGM->pInterPD->a[iNewPDE]   = Pde;
    779         pPGM->pHC32BitPD->a[iNewPDE] = Pde;
     778        pPGM->pInterPD->a[iNewPDE]        = Pde;
     779        pPGM->pShw32BitPdR3->a[iNewPDE]  = Pde;
    780780
    781781        /*
  • trunk/src/VBox/VMM/PGMPool.cpp

    r14133 r14147  
    255255    pPool->aPages[PGMPOOL_IDX_PD].Core.Key  = NIL_RTHCPHYS;
    256256    pPool->aPages[PGMPOOL_IDX_PD].GCPhys    = NIL_RTGCPHYS;
    257     pPool->aPages[PGMPOOL_IDX_PD].pvPageR3  = pVM->pgm.s.pHC32BitPD;
     257    pPool->aPages[PGMPOOL_IDX_PD].pvPageR3  = pVM->pgm.s.pShw32BitPdR3;
    258258    pPool->aPages[PGMPOOL_IDX_PD].enmKind   = PGMPOOLKIND_ROOT_32BIT_PD;
    259259    pPool->aPages[PGMPOOL_IDX_PD].idx       = PGMPOOL_IDX_PD;
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r14138 r14147  
    142142#  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    143143    const unsigned  iPDDst = pvFault >> SHW_PD_SHIFT;
    144     PX86PD          pPDDst = pVM->pgm.s.CTXMID(p,32BitPD);
     144    PX86PD          pPDDst = pgmShwGet32BitPDPtr(&pVM->pgm.s);
    145145
    146146#  elif PGM_SHW_TYPE == PGM_TYPE_PAE
     
    892892     */
    893893# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    894     const unsigned  iPDDst    = GCPtrPage >> SHW_PD_SHIFT;
    895     PX86PDE         pPdeDst   = &pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst];
     894    const unsigned  iPDDst    = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK;
     895    PX86PDE         pPdeDst   = pgmShwGet32BitPDEPtr(&pVM->pgm.s, GCPtrPage);
     896
    896897# elif PGM_SHW_TYPE == PGM_TYPE_PAE
    897898    const unsigned  iPdpt     = (GCPtrPage >> X86_PDPT_SHIFT);
     
    15881589     */
    15891590# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    1590     const unsigned iPDDst    = GCPtrPage >> SHW_PD_SHIFT;
    1591     X86PDE          PdeDst   = pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst];
     1591    const unsigned  iPDDst   = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK;
     1592    PX86PDE         pPdeDst  = pgmShwGet32BitPDEPtr(&pVM->pgm.s, GCPtrPage);
    15921593
    15931594# elif PGM_SHW_TYPE == PGM_TYPE_PAE
     
    15971598    PX86PDEPAE      pPdeDst  = pgmShwGetPaePDEPtr(&pVM->pgm.s, GCPtrPage);
    15981599    AssertReturn(pPdeDst, VERR_INTERNAL_ERROR);
    1599     X86PDEPAE       PdeDst   = *pPdeDst;
    16001600
    16011601# elif PGM_SHW_TYPE == PGM_TYPE_AMD64
     
    16031603    const unsigned  iPdpt    = (GCPtrPage >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64;
    16041604    PX86PDPAE       pPDDst;
    1605     X86PDEPAE       PdeDst;
    16061605    PX86PDPT        pPdptDst;
    16071606
     
    16091608    AssertRCSuccessReturn(rc, rc);
    16101609    Assert(pPDDst && pPdptDst);
    1611     PdeDst = pPDDst->a[iPDDst];
    1612 # endif
     1610    PX86PDEPAE      pPdeDst = &pPDDst->a[iPDDst];
     1611# endif
     1612
     1613    SHWPDE          PdeDst   = *pPdeDst;
    16131614    Assert(PdeDst.n.u1Present);
    16141615    PPGMPOOLPAGE    pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK);
     
    18041805                        PdeDst.n.u1Write = PdeSrc.n.u1Write;
    18051806                    }
    1806 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    1807                     pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst]    = PdeDst;
    1808 #  elif PGM_SHW_TYPE == PGM_TYPE_PAE
    18091807                    *pPdeDst = PdeDst;
    1810 #  elif PGM_SHW_TYPE == PGM_TYPE_AMD64
    1811                     pPDDst->a[iPDDst] = PdeDst;
    1812 #  endif
    18131808                    Log2(("SyncPage: BIG %RGv PdeSrc:{P=%d RW=%d U=%d raw=%08llx} GCPhys=%RGp%s\n",
    18141809                          GCPtrPage, PdeSrc.n.u1Present, PdeSrc.n.u1Write, PdeSrc.n.u1User, (uint64_t)PdeSrc.u, GCPhys,
     
    18401835# endif
    18411836
    1842 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    1843     pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst].u    = 0;
    1844 #  elif PGM_SHW_TYPE == PGM_TYPE_PAE
    18451837    pPdeDst->u = 0;
    1846 #  elif PGM_SHW_TYPE == PGM_TYPE_AMD64
    1847     pPDDst->a[iPDDst].u = 0;
    1848 #  endif
    18491838    PGM_INVL_GUEST_TLBS();
    18501839    return VINF_PGM_SYNCPAGE_MODIFIED_PDE;
     
    18591848     */
    18601849# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    1861     const unsigned  iPDDst = GCPtrPage >> SHW_PD_SHIFT;
    1862     X86PDE          PdeDst = pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst];
     1850    X86PDE          PdeDst = pgmShwGet32BitPDE(&pVM->pgm.s, GCPtrPage);
     1851
    18631852# elif PGM_SHW_TYPE == PGM_TYPE_PAE
    18641853    X86PDEPAE       PdeDst = pgmShwGetPaePDE(&pVM->pgm.s, GCPtrPage);
     
    23162305# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    23172306    const unsigned  iPDDst   = GCPtrPage >> SHW_PD_SHIFT;
    2318     PX86PD          pPDDst   = pVM->pgm.s.CTXMID(p,32BitPD);
    2319     PSHWPDE         pPdeDst = &pPDDst->a[iPDDst];
     2307    PSHWPDE         pPdeDst  = pgmShwGet32BitPDEPtr(&pVM->pgm.s, GCPtrPage);
    23202308
    23212309# elif PGM_SHW_TYPE == PGM_TYPE_PAE
     
    24042392# endif
    24052393# if PGM_GST_TYPE == PGM_TYPE_AMD64
    2406             rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_PT, pShwPde->idx,    iPDDst, &pShwPage);
     2394            rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_PT, pShwPde->idx,      iPDDst, &pShwPage);
    24072395# else
    24082396            rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_PT, SHW_POOL_ROOT_IDX, iPDDst, &pShwPage);
     
    24172405# endif
    24182406# if PGM_GST_TYPE == PGM_TYPE_AMD64
    2419             rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_BIG, pShwPde->idx,    iPDDst, &pShwPage);
     2407            rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_BIG, pShwPde->idx,      iPDDst, &pShwPage);
    24202408# else
    24212409            rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_BIG, SHW_POOL_ROOT_IDX, iPDDst, &pShwPage);
     
    27042692    int             rc = VINF_SUCCESS;
    27052693# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    2706     const unsigned  iPDDst = GCPtrPage >> SHW_PD_SHIFT;
    2707     PX86PD          pPDDst = pVM->pgm.s.CTXMID(p,32BitPD);
    2708     PSHWPDE         pPdeDst = &pPDDst->a[iPDDst];
     2694    const unsigned  iPDDst  = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK;
     2695    PSHWPDE         pPdeDst = pgmShwGet32BitPDEPtr(&pVM->pgm.s, GCPtrPage);
    27092696
    27102697# elif PGM_SHW_TYPE == PGM_TYPE_PAE
    2711     const unsigned  iPDDst = (GCPtrPage >> SHW_PD_SHIFT) /*& SHW_PD_MASK - only pool index atm!*/;
     2698    const unsigned  iPDDst  = (GCPtrPage >> SHW_PD_SHIFT) /*& SHW_PD_MASK - only pool index atm!*/;
    27122699    PX86PDEPAE      pPdeDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, GCPtrPage);
    27132700
    27142701# elif PGM_SHW_TYPE == PGM_TYPE_AMD64
    2715     const unsigned  iPdpt  = (GCPtrPage >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64;
    2716     const unsigned  iPDDst = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK;
     2702    const unsigned  iPdpt   = (GCPtrPage >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64;
     2703    const unsigned  iPDDst  = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK;
    27172704    PX86PDPAE       pPDDst;
    27182705    PX86PDPT        pPdptDst;
     
    27272714
    27282715# elif PGM_SHW_TYPE == PGM_TYPE_EPT
    2729     const unsigned  iPdpt  = (GCPtrPage >> EPT_PDPT_SHIFT) & EPT_PDPT_MASK;
    2730     const unsigned  iPDDst = ((GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK);
     2716    const unsigned  iPdpt   = (GCPtrPage >> EPT_PDPT_SHIFT) & EPT_PDPT_MASK;
     2717    const unsigned  iPDDst  = ((GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK);
    27312718    PEPTPD          pPDDst;
    27322719    PEPTPDPT        pPdptDst;
     
    28552842    {
    28562843# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    2857         const X86PDE    PdeDst = pVM->pgm.s.CTXMID(p,32BitPD)->a[GCPtrPage >> SHW_PD_SHIFT];
     2844        const X86PDE    PdeDst = pgmShwGet32BitPDE(&pVM->pgm.s, GCPtrPage);
    28582845# elif PGM_SHW_TYPE == PGM_TYPE_PAE
    28592846        const X86PDEPAE PdeDst = pgmShwGetPaePDE(&pVM->pgm.s, GCPtrPage);
     
    29752962     */
    29762963# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    2977     PX86PDE         pPdeDst = &pVM->pgm.s.CTXMID(p,32BitPD)->a[GCPtrPage >> SHW_PD_SHIFT];
     2964    PX86PDE         pPdeDst = pgmShwGet32BitPDEPtr(&pVM->pgm.s, GCPtrPage);
    29782965# elif PGM_SHW_TYPE == PGM_TYPE_PAE
    29792966    PX86PDEPAE      pPdeDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, GCPtrPage);
     
    31713158     */
    31723159#  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    3173     PX86PDE     pPDEDst = &pVM->pgm.s.CTXMID(p,32BitPD)->a[0];
     3160    PX86PDE     pPDEDst = pgmShwGet32BitPDEPtr(&pVM->pgm.s, 0);
    31743161#  else /* PGM_SHW_TYPE == PGM_TYPE_PAE */
    31753162#   if PGM_GST_TYPE == PGM_TYPE_32BIT
     
    32463233#  endif
    32473234#  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    3248             Assert(&pVM->pgm.s.CTXMID(p,32BitPD)->a[iPD] == pPDEDst);
     3235            Assert(pgmShwGet32BitPDEPtr(&pVM->pgm.s, (uint32_t)iPD << SHW_PD_SHIFT) == pPDEDst);
    32493236#  elif PGM_SHW_TYPE == PGM_TYPE_PAE
    32503237#   ifdef VBOX_STRICT
     
    37653752            GSTPD const    *pPDSrc = pgmGstGet32bitPDPtr(&pVM->pgm.s);
    37663753#  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    3767             PCX86PD         pPDDst = pPGM->CTXMID(p,32BitPD);
     3754            PCX86PD         pPDDst = pgmShwGet32BitPDPtr(&pVM->pgm.s);
    37683755#  endif
    37693756# endif /* PGM_GST_TYPE == PGM_TYPE_32BIT */
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r14133 r14147  
    112112    {
    113113        case PGMPOOL_IDX_PD:
    114             return pVM->pgm.s.pGC32BitPD;
     114            return pVM->pgm.s.pShw32BitPdRC;
    115115        case PGMPOOL_IDX_PAE_PD:
    116116        case PGMPOOL_IDX_PAE_PD_0:
  • trunk/src/VBox/VMM/VMMAll/PGMAllShw.h

    r14141 r14147  
    196196
    197197# else /* PGM_TYPE_32BIT */
    198     const unsigned  iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK;
    199     X86PDE          Pde = CTXMID(pVM->pgm.s.p,32BitPD)->a[iPd];
     198    X86PDE          Pde = pgmShwGet32BitPDE(&pVM->pgm.s, GCPtr);
    200199# endif
    201200    if (!Pde.n.u1Present)
     
    333332
    334333# else /* PGM_TYPE_32BIT */
    335         const unsigned  iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK;
    336         X86PDE          Pde = CTXMID(pVM->pgm.s.p,32BitPD)->a[iPd];
     334        X86PDE          Pde = pgmShwGet32BitPDE(&pVM->pgm.s, GCPtr);
    337335# endif
    338336        if (!Pde.n.u1Present)
  • trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp

    r14133 r14147  
    413413    GEN_CHECK_OFF(PGM, aGCPhysGstPaePDs);
    414414    GEN_CHECK_OFF(PGM, aGCPhysGstPaePDsMonitored);
    415     GEN_CHECK_OFF(PGM, pHC32BitPD);
    416     GEN_CHECK_OFF(PGM, pGC32BitPD);
     415    GEN_CHECK_OFF(PGM, pShw32BitPdR3);
     416#ifndef VBOX_WITH_2X_4GB_ADDR_SPACE
     417    GEN_CHECK_OFF(PGM, pShw32BitPdR0);
     418#endif
     419    GEN_CHECK_OFF(PGM, pShw32BitPdRC);
    417420    GEN_CHECK_OFF(PGM, HCPhys32BitPD);
    418421    GEN_CHECK_OFF(PGM, apShwPaePDsR3);
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