Lines Matching defs:pPage
351 PPGMPAGE pPage = pgmPhysGetPage(pVM, GCPhys);
352 return pPage != NULL;
367 PPGMPAGE pPage = pgmPhysGetPage(pVM, GCPhys);
368 return pPage
369 && PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM;
389 PPGMPAGE pPage;
390 int rc = pgmPhysGetPageEx(pVM, GCPhys, &pPage);
392 *pHCPhys = PGM_PAGE_GET_HCPHYS(pPage) | (GCPhys & PAGE_OFFSET_MASK);
412 pVM->pgm.s.PhysTlbHC.aEntries[i].pPage = 0;
438 pVM->pgm.s.PhysTlbHC.aEntries[idx].pPage = 0;
445 pTlbe->pPage = 0;
543 * @retval VINF_SUCCESS on success, pPage is modified.
550 * @param pPage The physical page tracking structure. This will
564 int pgmPhysAllocPage(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys)
566 LogFlow(("pgmPhysAllocPage: %R[pgmpage] %RGp\n", pPage, GCPhys));
572 AssertMsg(PGM_PAGE_IS_ZERO(pPage) || PGM_PAGE_IS_SHARED(pPage), ("%R[pgmpage] %RGp\n", pPage, GCPhys));
573 Assert(!PGM_PAGE_IS_MMIO_OR_ALIAS(pPage));
580 && PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM)
605 int rc = pgmPoolTrackUpdateGCPhys(pVM, GCPhys, pPage, true /*fFlushTLBs*/, &fFlushTLBs);
621 AssertMsg(PGM_PAGE_IS_ZERO(pPage) || PGM_PAGE_IS_SHARED(pPage), ("%R[pgmpage] %RGp\n", pPage, GCPhys));
622 Assert(!PGM_PAGE_IS_MMIO_OR_ALIAS(pPage));
641 if (PGM_PAGE_IS_SHARED(pPage))
644 pVM->pgm.s.aHandyPages[iHandyPage].idSharedPage = PGM_PAGE_GET_PAGEID(pPage);
645 Assert(PGM_PAGE_GET_PAGEID(pPage) != NIL_GMM_PAGEID);
647 Log(("PGM: Replaced shared page %#x at %RGp with %#x / %RHp\n", PGM_PAGE_GET_PAGEID(pPage),
653 rc = pgmPhysPageMapReadOnly(pVM, pPage, GCPhys, &pvSharedPage);
667 PGM_PAGE_SET_HCPHYS(pVM, pPage, HCPhys);
668 PGM_PAGE_SET_PAGEID(pVM, pPage, pVM->pgm.s.aHandyPages[iHandyPage].idPage);
669 PGM_PAGE_SET_STATE(pVM, pPage, PGM_PAGE_STATE_ALLOCATED);
670 PGM_PAGE_SET_PDE_TYPE(pVM, pPage, PGM_PAGE_PDE_TYPE_PT);
679 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, &pvNewPage, &PgMpLck); AssertRC(rc);
699 * @retval VINF_SUCCESS on success, pPage is modified.
820 PPGMPAGE pPage;
821 int rc = pgmPhysGetPageEx(pVM, GCPhys, &pPage);
824 if ( PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED
825 || PGM_PAGE_GET_PDE_TYPE(pPage) != PGM_PAGE_PDE_TYPE_PDE
826 || PGM_PAGE_GET_TYPE(pPage) != PGMPAGETYPE_RAM
827 || PGM_PAGE_GET_HNDL_PHYS_STATE(pPage) != PGM_PAGE_HNDL_PHYS_STATE_NONE)
829 LogFlow(("pgmPhysRecheckLargePage: checks failed for page %d; %x %x %x\n", i, PGM_PAGE_GET_STATE(pPage), PGM_PAGE_GET_TYPE(pPage), PGM_PAGE_GET_HNDL_PHYS_STATE(pPage)));
856 * @param pPage The physical page tracking structure.
860 void pgmPhysPageMakeWriteMonitoredWritable(PVM pVM, PPGMPAGE pPage)
862 Assert(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_WRITE_MONITORED);
863 PGM_PAGE_SET_WRITTEN_TO(pVM, pPage);
864 PGM_PAGE_SET_STATE(pVM, pPage, PGM_PAGE_STATE_ALLOCATED);
880 * @param pPage The physical page tracking structure.
885 int pgmPhysPageMakeWritable(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys)
888 switch (PGM_PAGE_GET_STATE(pPage))
891 pgmPhysPageMakeWriteMonitoredWritable(pVM, pPage);
903 if (PGM_PAGE_IS_MMIO(pPage))
907 return pgmPhysAllocPage(pVM, pPage, GCPhys);
1003 * @param pPage The physical page tracking structure.
1011 static int pgmPhysPageMapCommon(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, PPPGMPAGEMAP ppMap, void **ppv)
1021 RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(pPage);
1032 if ( PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_MMIO2
1033 || PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_MMIO2_ALIAS_MMIO)
1036 uint8_t idMmio2 = PGM_MMIO2_PAGEID_GET_MMIO2_ID(PGM_PAGE_GET_PAGEID(pPage));
1037 uint32_t iPage = PGM_MMIO2_PAGEID_GET_IDX(PGM_PAGE_GET_PAGEID(pPage));
1040 RT_ELEMENTS(pVM->pgm.s.CTX_SUFF(apMmio2Ranges)), PGM_PAGE_GET_TYPE(pPage), GCPhys,
1041 pPage->s.idPage, pPage->s.uStateY),
1052 const uint32_t idChunk = PGM_PAGE_GET_CHUNKID(pPage);
1055 AssertMsgReturn(PGM_PAGE_GET_PAGEID(pPage) == NIL_GMM_PAGEID, ("pPage=%R[pgmpage]\n", pPage),
1057 if (!PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(pPage))
1059 AssertMsgReturn(PGM_PAGE_IS_ZERO(pPage), ("pPage=%R[pgmpage]\n", pPage),
1061 AssertMsgReturn(PGM_PAGE_GET_HCPHYS(pPage)== pVM->pgm.s.HCPhysZeroPg, ("pPage=%R[pgmpage]\n", pPage),
1120 *ppv = (uint8_t *)pMap->pv + (PGM_PAGE_GET_PAGE_IN_CHUNK(pPage) << PAGE_SHIFT);
1139 * @param pPage The physical page tracking structure.
1147 int pgmPhysPageMakeWritableAndMap(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv)
1149 int rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
1154 int rc2 = pgmPhysPageMapCommon(pVM, pPage, GCPhys, &pMapIgnore, ppv);
1174 * @param pPage The physical page tracking structure. Must be in the
1183 int pgmPhysPageMap(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv)
1185 Assert(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_ALLOCATED);
1187 return pgmPhysPageMapCommon(pVM, pPage, GCPhys, &pMapIgnore, ppv);
1203 * @param pPage The physical page tracking structure.
1211 int pgmPhysPageMapReadOnly(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void const **ppv)
1214 return pgmPhysPageMapCommon(pVM, pPage, GCPhys, &pMapIgnore, (void **)ppv);
1236 PPGMPAGE pPage = pgmPhysGetPage(pVM, GCPhys);
1237 if (!pPage)
1243 return pgmPhysPageLoadIntoTlbWithPage(pVM, pPage, GCPhys);
1255 * @param pPage Pointer to the PGMPAGE structure corresponding to
1259 int pgmPhysPageLoadIntoTlbWithPage(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys)
1269 if ( !PGM_PAGE_IS_ZERO(pPage)
1270 && !PGM_PAGE_IS_BALLOONED(pPage))
1274 int rc = pgmPhysPageMapCommon(pVM, pPage, GCPhys, &pMap, &pv);
1283 AssertMsg(PGM_PAGE_GET_HCPHYS(pPage) == pVM->pgm.s.HCPhysZeroPg, ("%RGp/%R[pgmpage]\n", GCPhys, pPage));
1288 if ( PGM_PAGE_GET_TYPE(pPage) < PGMPAGETYPE_ROM_SHADOW
1289 || PGM_PAGE_GET_TYPE(pPage) > PGMPAGETYPE_ROM)
1296 pTlbe->pPage = pPage;
1313 * @param pPage Pointer to the PGMPAGE structure for the page.
1319 int pgmPhysGCPhys2CCPtrInternalDepr(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv)
1322 AssertReturn(pPage, VERR_PGM_PHYS_NULL_PAGE_PARAM);
1329 if (RT_UNLIKELY(PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED))
1331 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
1336 Assert(PGM_PAGE_GET_HCPHYS(pPage) != 0);
1344 PGM_PAGE_GET_HCPHYS(pPage),
1352 rc = pgmPhysPageQueryTlbeWithPage(pVM, pPage, GCPhys, &pTlbe);
1366 * @param pPage The page.
1370 DECLINLINE(void) pgmPhysPageMapLockForWriting(PVM pVM, PPGMPAGE pPage, PPGMPAGEMAPTLBE pTlbe, PPGMPAGEMAPLOCK pLock)
1376 unsigned cLocks = PGM_PAGE_GET_WRITE_LOCKS(pPage);
1381 PGM_PAGE_INC_WRITE_LOCKS(pPage);
1385 PGM_PAGE_INC_WRITE_LOCKS(pPage);
1386 AssertMsgFailed(("%R[pgmpage] is entering permanent write locked state!\n", pPage));
1391 pLock->uPageAndType = (uintptr_t)pPage | PGMPAGEMAPLOCK_TYPE_WRITE;
1399 * @param pPage The page.
1403 DECLINLINE(void) pgmPhysPageMapLockForReading(PVM pVM, PPGMPAGE pPage, PPGMPAGEMAPTLBE pTlbe, PPGMPAGEMAPLOCK pLock)
1409 unsigned cLocks = PGM_PAGE_GET_READ_LOCKS(pPage);
1414 PGM_PAGE_INC_READ_LOCKS(pPage);
1418 PGM_PAGE_INC_READ_LOCKS(pPage);
1419 AssertMsgFailed(("%R[pgmpage] is entering permanent read locked state!\n", pPage));
1424 pLock->uPageAndType = (uintptr_t)pPage | PGMPAGEMAPLOCK_TYPE_READ;
1442 * @param pPage Pointer to the PGMPAGE structure for the page.
1449 int pgmPhysGCPhys2CCPtrInternal(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock)
1452 AssertReturn(pPage, VERR_PGM_PHYS_NULL_PAGE_PARAM);
1458 if (RT_UNLIKELY(PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED))
1460 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
1465 Assert(PGM_PAGE_GET_HCPHYS(pPage) != 0);
1474 PGM_PAGE_GET_HCPHYS(pPage),
1485 rc = pgmPhysPageQueryTlbeWithPage(pVM, pPage, GCPhys, &pTlbe);
1488 pgmPhysPageMapLockForWriting(pVM, pPage, pTlbe, pLock);
1506 * @param pPage Pointer to the PGMPAGE structure for the page.
1513 int pgmPhysGCPhys2CCPtrInternalReadOnly(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, const void **ppv, PPGMPAGEMAPLOCK pLock)
1515 AssertReturn(pPage, VERR_PGM_PHYS_NULL_PAGE_PARAM);
1517 Assert(PGM_PAGE_GET_HCPHYS(pPage) != 0);
1526 PGM_PAGE_GET_HCPHYS(pPage),
1537 int rc = pgmPhysPageQueryTlbeWithPage(pVM, pPage, GCPhys, &pTlbe);
1540 pgmPhysPageMapLockForReading(pVM, pPage, pTlbe, pLock);
1589 PPGMPAGE pPage;
1590 rc = pgmPhysGetPageEx(pVM, GCPhys, &pPage);
1593 if (RT_UNLIKELY(PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED))
1594 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
1602 PGM_PAGE_GET_HCPHYS(pPage),
1629 PPGMPAGE pPage = pTlbe->pPage;
1630 if (RT_UNLIKELY(PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED))
1632 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
1636 rc = pgmPhysPageQueryTlbeWithPage(pVM, pPage, GCPhys, &pTlbe);
1644 pgmPhysPageMapLockForWriting(pVM, pPage, pTlbe, pLock);
1692 PPGMPAGE pPage;
1693 rc = pgmPhysGetPageEx(pVM, GCPhys, &pPage);
1696 if (RT_UNLIKELY(PGM_PAGE_IS_MMIO_OR_SPECIAL_ALIAS(pPage)))
1703 PGM_PAGE_GET_HCPHYS(pPage),
1727 PPGMPAGE pPage = pTlbe->pPage;
1728 if (RT_UNLIKELY(PGM_PAGE_IS_MMIO_OR_SPECIAL_ALIAS(pPage)))
1735 pgmPhysPageMapLockForReading(pVM, pPage, pTlbe, pLock);
1838 PPGMPAGE pPage = (PPGMPAGE)(pLock->uPageAndType & ~PGMPAGEMAPLOCK_TYPE_MASK);
1847 unsigned cLocks = PGM_PAGE_GET_WRITE_LOCKS(pPage);
1856 PGM_PAGE_DEC_WRITE_LOCKS(pPage);
1859 if (PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_WRITE_MONITORED)
1861 PGM_PAGE_SET_WRITTEN_TO(pVM, pPage);
1862 PGM_PAGE_SET_STATE(pVM, pPage, PGM_PAGE_STATE_ALLOCATED);
1870 unsigned cLocks = PGM_PAGE_GET_READ_LOCKS(pPage);
1879 PGM_PAGE_DEC_READ_LOCKS(pPage);
1943 PPGMPAGE pPage;
1944 int rc = pgmPhysGetPageAndRangeEx(pVM, GCPhys, &pPage, &pRam);
1946 rc = pgmPhysGCPhys2CCPtrInternalDepr(pVM, pPage, GCPhys, (void **)pR3Ptr);
1979 PPGMPAGE pPage;
1980 int rc = pgmPhysGetPageAndRangeEx(pVM, GCPhys, &pPage, &pRam);
1982 rc = pgmPhysGCPhys2CCPtrInternalDepr(pVM, pPage, GCPhys, (void **)pR3Ptr);
2078 * @param pPage The page descriptor.
2083 static int pgmPhysReadHandler(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void *pvBuf, size_t cb)
2095 int rc = pgmPhysGCPhys2CCPtrInternalReadOnly(pVM, pPage, GCPhys, &pvSrc, &PgMpLck);
2099 GCPhys, pPage, rc));
2111 if ( PGM_PAGE_GET_HNDL_PHYS_STATE(pPage) == PGM_PAGE_HNDL_PHYS_STATE_ALL
2112 || PGM_PAGE_IS_MMIO_OR_SPECIAL_ALIAS(pPage))
2125 Log5(("pgmPhysReadHandler: GCPhys=%RGp cb=%#x pPage=%R[pgmpage] phys %s\n", GCPhys, cb, pPage, R3STRING(pPhys->pszDesc) ));
2151 if (PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) == PGM_PAGE_HNDL_VIRT_STATE_ALL)
2166 Log5(("pgmPhysReadHandler: GCPhys=%RGp cb=%#x pPage=%R[pgmpage] virt %s\n", GCPhys, cb, pPage, R3STRING(pVirt->pszDesc) ));
2168 Log(("pgmPhysReadHandler: GCPhys=%RGp cb=%#x pPage=%R[pgmpage] phys/virt %s/%s\n", GCPhys, cb, pPage, R3STRING(pVirt->pszDesc), R3STRING(pPhys->pszDesc) ));
2178 AssertLogRelMsg(rc2 == VINF_SUCCESS || rc2 == VINF_PGM_HANDLER_DO_DEFAULT, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc2, GCPhys, pPage, pVirt->pszDesc));
2181 Log5(("pgmPhysReadHandler: GCPhys=%RGp cb=%#x pPage=%R[pgmpage] virt %s [no handler]\n", GCPhys, cb, pPage, R3STRING(pVirt->pszDesc) ));
2241 PPGMPAGE pPage = &pRam->aPages[iPage];
2249 if (RT_UNLIKELY( PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)
2250 || PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(pPage)))
2252 int rc = pgmPhysReadHandler(pVM, pPage, pRam->GCPhys + off, pvBuf, cb);
2266 int rc = pgmPhysGCPhys2CCPtrInternalReadOnly(pVM, pPage, pRam->GCPhys + off, &pvSrc, &PgMpLck);
2275 pRam->GCPhys + off, pPage, rc));
2331 * @param pPage The page descriptor.
2336 static int pgmPhysWriteHandler(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void const *pvBuf, size_t cbWrite)
2349 if ( !PGM_PAGE_HAS_ACTIVE_VIRTUAL_HANDLERS(pPage)
2350 || PGM_PAGE_IS_MMIO_OR_SPECIAL_ALIAS(pPage) /* screw virtual handlers on MMIO pages */)
2369 Log5(("pgmPhysWriteHandler: GCPhys=%RGp cbRange=%#x pPage=%R[pgmpage] phys %s\n", GCPhys, cbRange, pPage, R3STRING(pCur->pszDesc) ));
2370 if (!PGM_PAGE_IS_MMIO_OR_SPECIAL_ALIAS(pPage))
2371 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, &pvDst, &PgMpLck);
2398 AssertLogRelMsg(rc == VINF_SUCCESS || rc == VINF_PGM_HANDLER_DO_DEFAULT, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc, GCPhys, pPage, (pCur) ? pCur->pszDesc : ""));
2402 GCPhys, pPage, rc), rc);
2418 Assert(!PGM_PAGE_IS_MMIO_OR_ALIAS(pPage)); /* MMIO handlers are all PAGE_SIZEed! */
2424 else if (!PGM_PAGE_HAS_ACTIVE_PHYSICAL_HANDLERS(pPage))
2443 Log5(("pgmPhysWriteHandler: GCPhys=%RGp cbRange=%#x pPage=%R[pgmpage] virt %s\n", GCPhys, cbRange, pPage, R3STRING(pCur->pszDesc) ));
2444 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, &pvDst, &PgMpLck);
2461 AssertLogRelMsg(rc == VINF_SUCCESS, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc, GCPhys, pPage, pCur->pszDesc));
2465 GCPhys, pPage, rc), rc);
2489 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, &pvDst, &PgMpLck);
2492 GCPhys, pPage, rc), rc);
2500 bool fMoreVirt = PGM_PAGE_HAS_ACTIVE_VIRTUAL_HANDLERS(pPage);
2505 bool fMorePhys = PGM_PAGE_HAS_ACTIVE_PHYSICAL_HANDLERS(pPage);
2585 Log5(("pgmPhysWriteHandler: GCPhys=%RGp cbRange=%#x pPage=%R[pgmpage] miss\n", GCPhys, cbRange, pPage));
2600 Log5(("pgmPhysWriteHandler: GCPhys=%RGp cbRange=%#x pPage=%R[pgmpage] phys %s\n", GCPhys, cbRange, pPage, R3STRING(pPhys->pszDesc) ));
2614 AssertLogRelMsg(rc == VINF_SUCCESS || rc == VINF_PGM_HANDLER_DO_DEFAULT, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc, GCPhys, pPage, (pPhys) ? pPhys->pszDesc : ""));
2633 Log5(("pgmPhysWriteHandler: GCPhys=%RGp cbRange=%#x pPage=%R[pgmpage] phys %s\n", GCPhys, cbRange, pPage, R3STRING(pVirt->pszDesc) ));
2642 AssertLogRelMsg(rc == VINF_SUCCESS || rc == VINF_PGM_HANDLER_DO_DEFAULT, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc, GCPhys, pPage, pVirt->pszDesc));
2666 Log(("pgmPhysWriteHandler: overlapping phys and virt handlers at %RGp %R[pgmpage]; cbRange=%#x\n", GCPhys, pPage, cbRange));
2667 Log5(("pgmPhysWriteHandler: GCPhys=%RGp cbRange=%#x pPage=%R[pgmpage] phys/virt %s/%s\n", GCPhys, cbRange, pPage, R3STRING(pPhys->pszDesc), R3STRING(pVirt->pszDesc) ));
2685 AssertLogRelMsg(rc == VINF_SUCCESS || rc == VINF_PGM_HANDLER_DO_DEFAULT, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc, GCPhys, pPage, (pPhys) ? pPhys->pszDesc : ""));
2698 AssertLogRelMsg(rc2 == VINF_SUCCESS || rc2 == VINF_PGM_HANDLER_DO_DEFAULT, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc, GCPhys, pPage, pVirt->pszDesc));
2777 PPGMPAGE pPage = &pRam->aPages[iPage];
2785 if ( PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage)
2786 || PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(pPage))
2788 int rc = pgmPhysWriteHandler(pVM, pPage, pRam->GCPhys + off, pvBuf, cb);
2802 int rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, pRam->GCPhys + off, &pvDst, &PgMpLck);
2805 Assert(!PGM_PAGE_IS_BALLOONED(pPage));
2810 else if (!PGM_PAGE_IS_BALLOONED(pPage))
2812 pRam->GCPhys + off, pPage, rc));
4020 PPGMPAGE pPage = pgmPhysGetPage(pVM, GCPhys);
4021 PGMPAGETYPE enmPgType = pPage ? (PGMPAGETYPE)PGM_PAGE_GET_TYPE(pPage) : PGMPAGETYPE_INVALID;
4063 PPGMPAGE pPage;
4064 int rc = pgmPhysGetPageAndRangeEx(pVM, GCPhys, &pPage, &pRam);
4067 if (PGM_PAGE_IS_BALLOONED(pPage))
4069 else if (PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(pPage))
4071 else if ( !PGM_PAGE_HAS_ANY_HANDLERS(pPage)
4072 || (fByPassHandlers && !PGM_PAGE_IS_MMIO(pPage)) )
4076 if (PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)) /* catches MMIO */
4078 Assert(!fByPassHandlers || PGM_PAGE_IS_MMIO(pPage));
4081 else if (PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage) && fWritable)
4093 switch (PGM_PAGE_GET_STATE(pPage))
4102 rc2 = pgmPhysPageMakeWritable(pVM, pPage, GCPhys & ~(RTGCPHYS)PAGE_OFFSET_MASK);
4110 PGM_PAGE_GET_HCPHYS(pPage),
4122 rc2 = pgmPhysPageQueryTlbeWithPage(pVM, pPage, GCPhys, &pTlbe);
4127 pgmPhysPageMapLockForWriting(pVM, pPage, pTlbe, pLock);
4129 pgmPhysPageMapLockForReading(pVM, pPage, pTlbe, pLock);
4133 Log6(("PGMPhysIemGCPhys2Ptr: GCPhys=%RGp rc=%Rrc pPage=%R[pgmpage] *ppv=%p\n", GCPhys, rc, pPage, *ppv));
4136 Log6(("PGMPhysIemGCPhys2Ptr: GCPhys=%RGp rc=%Rrc pPage=%R[pgmpage]\n", GCPhys, rc, pPage));
4176 PPGMPAGE pPage;
4177 int rc = pgmPhysGetPageAndRangeEx(pVM, GCPhys, &pPage, &pRam);
4180 if (PGM_PAGE_IS_BALLOONED(pPage))
4182 else if (PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(pPage))
4184 else if ( !PGM_PAGE_HAS_ANY_HANDLERS(pPage)
4185 || (fByPassHandlers && !PGM_PAGE_IS_MMIO(pPage)) )
4189 if (PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)) /* catches MMIO */
4191 Assert(!fByPassHandlers || PGM_PAGE_IS_MMIO(pPage));
4194 else if (PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage) && fWritable)