Changeset 32036 in vbox for trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
- Timestamp:
- Aug 27, 2010 10:14:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r31996 r32036 145 145 pNew->Core.KeyLast = GCPhysLast; 146 146 pNew->enmType = enmType; 147 pNew->cPages = (GCPhysLast - (GCPhys & X86_PTE_PAE_PG_MASK _FULL) + PAGE_SIZE) >> PAGE_SHIFT;147 pNew->cPages = (GCPhysLast - (GCPhys & X86_PTE_PAE_PG_MASK) + PAGE_SIZE) >> PAGE_SHIFT; 148 148 pNew->pfnHandlerR3 = pfnHandlerR3; 149 149 pNew->pvUserR3 = pvUserR3; … … 307 307 && PGM_PAGE_GET_HNDL_PHYS_STATE(pPage) != PGM_PAGE_HNDL_PHYS_STATE_NONE) 308 308 { 309 RTGCPHYS GCPhys = (GCPhysStart + (PAGE_SIZE - 1)) & X86_PTE_PAE_PG_MASK _FULL;309 RTGCPHYS GCPhys = (GCPhysStart + (PAGE_SIZE - 1)) & X86_PTE_PAE_PG_MASK; 310 310 if ( GCPhys > GCPhysLast 311 311 || GCPhys < GCPhysStart) … … 314 314 } 315 315 else 316 GCPhysStart &= X86_PTE_PAE_PG_MASK _FULL;316 GCPhysStart &= X86_PTE_PAE_PG_MASK; 317 317 Assert(!pPage || PGM_PAGE_GET_TYPE(pPage) != PGMPAGETYPE_MMIO); /* these are page aligned atm! */ 318 318 } … … 324 324 && PGM_PAGE_GET_HNDL_PHYS_STATE(pPage) != PGM_PAGE_HNDL_PHYS_STATE_NONE) 325 325 { 326 RTGCPHYS GCPhys = (GCPhysLast & X86_PTE_PAE_PG_MASK _FULL) - 1;326 RTGCPHYS GCPhys = (GCPhysLast & X86_PTE_PAE_PG_MASK) - 1; 327 327 if ( GCPhys < GCPhysStart 328 328 || GCPhys > GCPhysLast) … … 536 536 pCur->Core.Key = GCPhys; 537 537 pCur->Core.KeyLast = GCPhysLast; 538 pCur->cPages = (GCPhysLast - (GCPhys & X86_PTE_PAE_PG_MASK _FULL) + 1) >> PAGE_SHIFT;538 pCur->cPages = (GCPhysLast - (GCPhys & X86_PTE_PAE_PG_MASK) + 1) >> PAGE_SHIFT; 539 539 540 540 if (RTAvlroGCPhysInsert(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, &pCur->Core)) … … 684 684 *pNew = *pCur; 685 685 pNew->Core.Key = GCPhysSplit; 686 pNew->cPages = (pNew->Core.KeyLast - (pNew->Core.Key & X86_PTE_PAE_PG_MASK _FULL) + PAGE_SIZE) >> PAGE_SHIFT;686 pNew->cPages = (pNew->Core.KeyLast - (pNew->Core.Key & X86_PTE_PAE_PG_MASK) + PAGE_SIZE) >> PAGE_SHIFT; 687 687 688 688 pCur->Core.KeyLast = GCPhysSplit - 1; 689 pCur->cPages = (pCur->Core.KeyLast - (pCur->Core.Key & X86_PTE_PAE_PG_MASK _FULL) + PAGE_SIZE) >> PAGE_SHIFT;689 pCur->cPages = (pCur->Core.KeyLast - (pCur->Core.Key & X86_PTE_PAE_PG_MASK) + PAGE_SIZE) >> PAGE_SHIFT; 690 690 691 691 if (RT_LIKELY(RTAvlroGCPhysInsert(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, &pNew->Core))) … … 750 750 { 751 751 pCur1->Core.KeyLast = pCur2->Core.KeyLast; 752 pCur1->cPages = (pCur1->Core.KeyLast - (pCur1->Core.Key & X86_PTE_PAE_PG_MASK _FULL) + PAGE_SIZE) >> PAGE_SHIFT;752 pCur1->cPages = (pCur1->Core.KeyLast - (pCur1->Core.Key & X86_PTE_PAE_PG_MASK) + PAGE_SIZE) >> PAGE_SHIFT; 753 753 LogFlow(("PGMHandlerPhysicalJoin: %RGp-%RGp %RGp-%RGp\n", 754 754 pCur1->Core.Key, pCur1->Core.KeyLast, pCur2->Core.Key, pCur2->Core.KeyLast)); … … 1481 1481 for (unsigned iPage = 0; iPage < pCur->cPages; iPage++) 1482 1482 { 1483 if ((pCur->aPhysToVirt[iPage].Core.Key & X86_PTE_PAE_PG_MASK _FULL) == pState->GCPhys)1483 if ((pCur->aPhysToVirt[iPage].Core.Key & X86_PTE_PAE_PG_MASK) == pState->GCPhys) 1484 1484 { 1485 1485 unsigned uState = pgmHandlerVirtualCalcState(pCur); … … 1574 1574 1575 1575 AssertRCReturn(rc, 0); 1576 if ((pVirt->aPhysToVirt[iPage].Core.Key & X86_PTE_PAE_PG_MASK _FULL) != GCPhysGst)1576 if ((pVirt->aPhysToVirt[iPage].Core.Key & X86_PTE_PAE_PG_MASK) != GCPhysGst) 1577 1577 { 1578 1578 AssertMsgFailed(("virt handler phys out of sync. %RGp GCPhysGst=%RGp iPage=%#x %RGv %s\n", … … 1713 1713 GCPhysKey, true /* above-or-equal */); 1714 1714 if ( !pPhys2Virt 1715 || (pPhys2Virt->Core.Key & X86_PTE_PAE_PG_MASK _FULL) != State.GCPhys)1715 || (pPhys2Virt->Core.Key & X86_PTE_PAE_PG_MASK) != State.GCPhys) 1716 1716 break; 1717 1717 … … 1732 1732 1733 1733 /* done? */ 1734 if ((GCPhysKey & X86_PTE_PAE_PG_MASK _FULL) != State.GCPhys)1734 if ((GCPhysKey & X86_PTE_PAE_PG_MASK) != State.GCPhys) 1735 1735 break; 1736 1736 }
Note:
See TracChangeset
for help on using the changeset viewer.