Changeset 14147 in vbox
- Timestamp:
- Nov 12, 2008 11:07:51 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r14133 r14147 1412 1412 * As with the intermediate context, AMD64 uses the PAE PDPT and PDs. 1413 1413 */ 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 1415 1418 pVM->pgm.s.apShwPaePDsR3[0] = (PX86PDPAE)MMR3PageAlloc(pVM); 1416 1419 pVM->pgm.s.apShwPaePDsR3[1] = (PX86PDPAE)MMR3PageAlloc(pVM); … … 1435 1438 #endif 1436 1439 1437 if ( !pVM->pgm.s.p HC32BitPD1440 if ( !pVM->pgm.s.pShw32BitPdR3 1438 1441 || !pVM->pgm.s.apShwPaePDsR3[0] 1439 1442 || !pVM->pgm.s.apShwPaePDsR3[1] … … 1448 1451 1449 1452 /* get physical addresses. */ 1450 pVM->pgm.s.HCPhys32BitPD = MMPage2Phys(pVM, pVM->pgm.s.p HC32BitPD);1451 Assert(MMPagePhys2Page(pVM, pVM->pgm.s.HCPhys32BitPD) == pVM->pgm.s.p HC32BitPD);1453 pVM->pgm.s.HCPhys32BitPD = MMPage2Phys(pVM, pVM->pgm.s.pShw32BitPdR3); 1454 Assert(MMPagePhys2Page(pVM, pVM->pgm.s.HCPhys32BitPD) == pVM->pgm.s.pShw32BitPdR3); 1452 1455 pVM->pgm.s.aHCPhysPaePDs[0] = MMPage2Phys(pVM, pVM->pgm.s.apShwPaePDsR3[0]); 1453 1456 pVM->pgm.s.aHCPhysPaePDs[1] = MMPage2Phys(pVM, pVM->pgm.s.apShwPaePDsR3[1]); … … 1460 1463 * Initialize the pages, setting up the PML4 and PDPT for action below 4GB. 1461 1464 */ 1462 ASMMemZero32(pVM->pgm.s.p HC32BitPD, PAGE_SIZE);1465 ASMMemZero32(pVM->pgm.s.pShw32BitPdR3, PAGE_SIZE); 1463 1466 ASMMemZero32(pVM->pgm.s.pShwPaePdptR3, PAGE_SIZE); 1464 1467 ASMMemZero32(pVM->pgm.s.pShwNestedRootR3, PAGE_SIZE); … … 1773 1776 int rc = MMR3HyperReserve(pVM, PAGE_SIZE * (2 + RT_ELEMENTS(pVM->pgm.s.apShwPaePDsR3) + 1 + 2 + 2), "Paging", &GCPtr); 1774 1777 AssertRCReturn(rc, rc); 1775 pVM->pgm.s.p GC32BitPD= GCPtr;1778 pVM->pgm.s.pShw32BitPdRC = GCPtr; 1776 1779 MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); 1777 1780 … … 1810 1813 * Map the paging pages into the guest context. 1811 1814 */ 1812 RTGCPTR GCPtr = pVM->pgm.s.p GC32BitPD;1815 RTGCPTR GCPtr = pVM->pgm.s.pShw32BitPdRC; 1813 1816 AssertReleaseReturn(GCPtr, VERR_INTERNAL_ERROR); 1814 1817 1815 1818 int rc = PGMMap(pVM, GCPtr, pVM->pgm.s.HCPhys32BitPD, PAGE_SIZE, 0); 1816 1819 AssertRCReturn(rc, rc); 1817 pVM->pgm.s.p GC32BitPD= GCPtr;1820 pVM->pgm.s.pShw32BitPdRC = GCPtr; 1818 1821 GCPtr += PAGE_SIZE; 1819 1822 GCPtr += PAGE_SIZE; /* reserved page */ … … 1900 1903 pVM->pgm.s.GCPtrCR3Mapping += offDelta; 1901 1904 /** @todo move this into shadow and guest specific relocation functions. */ 1902 AssertMsg(pVM->pgm.s.p GC32BitPD, ("Init order, no relocation before paging is initialized!\n"));1903 pVM->pgm.s.p GC32BitPD+= offDelta;1905 AssertMsg(pVM->pgm.s.pShw32BitPdR3, ("Init order, no relocation before paging is initialized!\n")); 1906 pVM->pgm.s.pShw32BitPdRC += offDelta; 1904 1907 pVM->pgm.s.pGuestPDRC += offDelta; 1905 1908 AssertCompile(RT_ELEMENTS(pVM->pgm.s.apShwPaePDsRC) == RT_ELEMENTS(pVM->pgm.s.apGstPaePDsRC)); -
trunk/src/VBox/VMM/PGMInternal.h
r14146 r14147 2042 2042 /** @name 32-bit Shadow Paging 2043 2043 * @{ */ 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; 2052 2050 #if HC_ARCH_BITS == 64 2053 2051 uint32_t u32Padding1; /**< alignment padding. */ … … 3803 3801 #endif /* !IN_RC */ 3804 3802 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 */ 3810 DECLINLINE(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 */ 3831 DECLINLINE(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 */ 3858 DECLINLINE(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 3805 3873 /** 3806 3874 * Gets the shadow page pointer table, PAE. -
trunk/src/VBox/VMM/PGMMap.cpp
r14145 r14147 61 61 { 62 62 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.p HC32BitPD, ("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")); 64 64 65 65 /* … … 722 722 * 32-bit. 723 723 */ 724 pPGM->pInterPD->a[iOldPDE].u = 0;725 pPGM->p HC32BitPD->a[iOldPDE].u= 0;724 pPGM->pInterPD->a[iOldPDE].u = 0; 725 pPGM->pShw32BitPdR3->a[iOldPDE].u = 0; 726 726 727 727 /* … … 771 771 * 32-bit. 772 772 */ 773 if (pPGM->p HC32BitPD->a[iNewPDE].n.u1Present)774 pgmPoolFree(pVM, pPGM->p HC32BitPD->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); 775 775 X86PDE Pde; 776 776 /* Default mapping page directory flags are read/write and supervisor; individual page attributes determine the final flags */ 777 777 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->p HC32BitPD->a[iNewPDE]= Pde;778 pPGM->pInterPD->a[iNewPDE] = Pde; 779 pPGM->pShw32BitPdR3->a[iNewPDE] = Pde; 780 780 781 781 /* -
trunk/src/VBox/VMM/PGMPool.cpp
r14133 r14147 255 255 pPool->aPages[PGMPOOL_IDX_PD].Core.Key = NIL_RTHCPHYS; 256 256 pPool->aPages[PGMPOOL_IDX_PD].GCPhys = NIL_RTGCPHYS; 257 pPool->aPages[PGMPOOL_IDX_PD].pvPageR3 = pVM->pgm.s.p HC32BitPD;257 pPool->aPages[PGMPOOL_IDX_PD].pvPageR3 = pVM->pgm.s.pShw32BitPdR3; 258 258 pPool->aPages[PGMPOOL_IDX_PD].enmKind = PGMPOOLKIND_ROOT_32BIT_PD; 259 259 pPool->aPages[PGMPOOL_IDX_PD].idx = PGMPOOL_IDX_PD; -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r14138 r14147 142 142 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 143 143 const unsigned iPDDst = pvFault >> SHW_PD_SHIFT; 144 PX86PD pPDDst = p VM->pgm.s.CTXMID(p,32BitPD);144 PX86PD pPDDst = pgmShwGet32BitPDPtr(&pVM->pgm.s); 145 145 146 146 # elif PGM_SHW_TYPE == PGM_TYPE_PAE … … 892 892 */ 893 893 # 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 896 897 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 897 898 const unsigned iPdpt = (GCPtrPage >> X86_PDPT_SHIFT); … … 1588 1589 */ 1589 1590 # 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); 1592 1593 1593 1594 # elif PGM_SHW_TYPE == PGM_TYPE_PAE … … 1597 1598 PX86PDEPAE pPdeDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, GCPtrPage); 1598 1599 AssertReturn(pPdeDst, VERR_INTERNAL_ERROR); 1599 X86PDEPAE PdeDst = *pPdeDst;1600 1600 1601 1601 # elif PGM_SHW_TYPE == PGM_TYPE_AMD64 … … 1603 1603 const unsigned iPdpt = (GCPtrPage >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64; 1604 1604 PX86PDPAE pPDDst; 1605 X86PDEPAE PdeDst;1606 1605 PX86PDPT pPdptDst; 1607 1606 … … 1609 1608 AssertRCSuccessReturn(rc, rc); 1610 1609 Assert(pPDDst && pPdptDst); 1611 PdeDst = pPDDst->a[iPDDst]; 1612 # endif 1610 PX86PDEPAE pPdeDst = &pPDDst->a[iPDDst]; 1611 # endif 1612 1613 SHWPDE PdeDst = *pPdeDst; 1613 1614 Assert(PdeDst.n.u1Present); 1614 1615 PPGMPOOLPAGE pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK); … … 1804 1805 PdeDst.n.u1Write = PdeSrc.n.u1Write; 1805 1806 } 1806 # if PGM_SHW_TYPE == PGM_TYPE_32BIT1807 pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst] = PdeDst;1808 # elif PGM_SHW_TYPE == PGM_TYPE_PAE1809 1807 *pPdeDst = PdeDst; 1810 # elif PGM_SHW_TYPE == PGM_TYPE_AMD641811 pPDDst->a[iPDDst] = PdeDst;1812 # endif1813 1808 Log2(("SyncPage: BIG %RGv PdeSrc:{P=%d RW=%d U=%d raw=%08llx} GCPhys=%RGp%s\n", 1814 1809 GCPtrPage, PdeSrc.n.u1Present, PdeSrc.n.u1Write, PdeSrc.n.u1User, (uint64_t)PdeSrc.u, GCPhys, … … 1840 1835 # endif 1841 1836 1842 # if PGM_SHW_TYPE == PGM_TYPE_32BIT1843 pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst].u = 0;1844 # elif PGM_SHW_TYPE == PGM_TYPE_PAE1845 1837 pPdeDst->u = 0; 1846 # elif PGM_SHW_TYPE == PGM_TYPE_AMD641847 pPDDst->a[iPDDst].u = 0;1848 # endif1849 1838 PGM_INVL_GUEST_TLBS(); 1850 1839 return VINF_PGM_SYNCPAGE_MODIFIED_PDE; … … 1859 1848 */ 1860 1849 # 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 1863 1852 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 1864 1853 X86PDEPAE PdeDst = pgmShwGetPaePDE(&pVM->pgm.s, GCPtrPage); … … 2316 2305 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 2317 2306 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); 2320 2308 2321 2309 # elif PGM_SHW_TYPE == PGM_TYPE_PAE … … 2404 2392 # endif 2405 2393 # 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); 2407 2395 # else 2408 2396 rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_PT, SHW_POOL_ROOT_IDX, iPDDst, &pShwPage); … … 2417 2405 # endif 2418 2406 # 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); 2420 2408 # else 2421 2409 rc = pgmPoolAlloc(pVM, GCPhys, BTH_PGMPOOLKIND_PT_FOR_BIG, SHW_POOL_ROOT_IDX, iPDDst, &pShwPage); … … 2704 2692 int rc = VINF_SUCCESS; 2705 2693 # 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); 2709 2696 2710 2697 # 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!*/; 2712 2699 PX86PDEPAE pPdeDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, GCPtrPage); 2713 2700 2714 2701 # 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; 2717 2704 PX86PDPAE pPDDst; 2718 2705 PX86PDPT pPdptDst; … … 2727 2714 2728 2715 # 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); 2731 2718 PEPTPD pPDDst; 2732 2719 PEPTPDPT pPdptDst; … … 2855 2842 { 2856 2843 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 2857 const X86PDE PdeDst = p VM->pgm.s.CTXMID(p,32BitPD)->a[GCPtrPage >> SHW_PD_SHIFT];2844 const X86PDE PdeDst = pgmShwGet32BitPDE(&pVM->pgm.s, GCPtrPage); 2858 2845 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 2859 2846 const X86PDEPAE PdeDst = pgmShwGetPaePDE(&pVM->pgm.s, GCPtrPage); … … 2975 2962 */ 2976 2963 # 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); 2978 2965 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 2979 2966 PX86PDEPAE pPdeDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, GCPtrPage); … … 3171 3158 */ 3172 3159 # 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); 3174 3161 # else /* PGM_SHW_TYPE == PGM_TYPE_PAE */ 3175 3162 # if PGM_GST_TYPE == PGM_TYPE_32BIT … … 3246 3233 # endif 3247 3234 # 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); 3249 3236 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 3250 3237 # ifdef VBOX_STRICT … … 3765 3752 GSTPD const *pPDSrc = pgmGstGet32bitPDPtr(&pVM->pgm.s); 3766 3753 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 3767 PCX86PD pPDDst = p PGM->CTXMID(p,32BitPD);3754 PCX86PD pPDDst = pgmShwGet32BitPDPtr(&pVM->pgm.s); 3768 3755 # endif 3769 3756 # endif /* PGM_GST_TYPE == PGM_TYPE_32BIT */ -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r14133 r14147 112 112 { 113 113 case PGMPOOL_IDX_PD: 114 return pVM->pgm.s.p GC32BitPD;114 return pVM->pgm.s.pShw32BitPdRC; 115 115 case PGMPOOL_IDX_PAE_PD: 116 116 case PGMPOOL_IDX_PAE_PD_0: -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r14141 r14147 196 196 197 197 # 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); 200 199 # endif 201 200 if (!Pde.n.u1Present) … … 333 332 334 333 # 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); 337 335 # endif 338 336 if (!Pde.n.u1Present) -
trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp
r14133 r14147 413 413 GEN_CHECK_OFF(PGM, aGCPhysGstPaePDs); 414 414 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); 417 420 GEN_CHECK_OFF(PGM, HCPhys32BitPD); 418 421 GEN_CHECK_OFF(PGM, apShwPaePDsR3);
Note:
See TracChangeset
for help on using the changeset viewer.