Lines Matching defs:a_pPage

767  * @param   a_pPage     Pointer to the physical guest page tracking structure.
769 #define PGM_PAGE_CLEAR(a_pPage) \
771 (a_pPage)->au64[0] = 0; \
772 (a_pPage)->au64[1] = 0; \
777 * @param a_pPage Pointer to the physical guest page tracking structure.
779 #define PGM_PAGE_INIT(a_pPage, a_HCPhys, a_idPage, a_uType, a_uState) \
783 (a_pPage)->au64[0] = SetHCPhysTmp; \
784 (a_pPage)->au64[1] = 0; \
785 (a_pPage)->s.idPage = (a_idPage); \
786 (a_pPage)->s.uStateY = (a_uState); \
787 (a_pPage)->s.uTypeY = (a_uType); \
792 * @param a_pPage Pointer to the physical guest page tracking structure.
796 #define PGM_PAGE_INIT_ZERO(a_pPage, a_pVM, a_uType) \
797 PGM_PAGE_INIT((a_pPage), (a_pVM)->pgm.s.HCPhysZeroPg, NIL_GMM_PAGEID, (a_uType), PGM_PAGE_STATE_ZERO)
833 * @param a_pPage Pointer to the physical guest page tracking structure.
838 #define PGM_PAGE_GET_STATE_NA(a_pPage) ( (a_pPage)->s.uStateY )
840 # define PGM_PAGE_GET_STATE(a_pPage) __extension__ ({ PGM_PAGE_ASSERT_LOCK(pVM); PGM_PAGE_GET_STATE_NA(a_pPage); })
848 * @param a_pPage Pointer to the physical guest page tracking structure.
851 #define PGM_PAGE_SET_STATE(a_pVM, a_pPage, a_uState) \
852 do { (a_pPage)->s.uStateY = (a_uState); PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
858 * @param a_pPage Pointer to the physical guest page tracking structure.
867 # define PGM_PAGE_GET_HCPHYS_NA(a_pPage) ( (a_pPage)->s.HCPhysFN << 12 )
870 # define PGM_PAGE_GET_HCPHYS_NA(a_pPage) ( (a_pPage)->au64[0] & UINT64_C(0x0000fffffffff000) )
872 # define PGM_PAGE_GET_HCPHYS(a_pPage) __extension__ ({ PGM_PAGE_ASSERT_LOCK(pVM); PGM_PAGE_GET_HCPHYS_NA(a_pPage); })
882 * @param a_pPage Pointer to the physical guest page tracking structure.
885 #define PGM_PAGE_SET_HCPHYS(a_pVM, a_pPage, a_HCPhys) \
889 (a_pPage)->s.HCPhysFN = SetHCPhysTmp >> 12; \
896 * @param a_pPage Pointer to the physical guest page tracking structure.
898 #define PGM_PAGE_GET_PAGEID(a_pPage) ( (uint32_t)(a_pPage)->s.idPage )
903 * @param a_pPage Pointer to the physical guest page tracking structure.
906 #define PGM_PAGE_SET_PAGEID(a_pVM, a_pPage, a_idPage) \
908 (a_pPage)->s.idPage = (a_idPage); \
915 * @param a_pPage Pointer to the physical guest page tracking structure.
917 #define PGM_PAGE_GET_CHUNKID(a_pPage) ( PGM_PAGE_GET_PAGEID(a_pPage) >> GMM_CHUNKID_SHIFT )
922 * @param a_pPage Pointer to the physical guest page tracking structure.
924 #define PGM_PAGE_GET_PAGE_IN_CHUNK(a_pPage) ( PGM_PAGE_GET_PAGEID(a_pPage) & GMM_PAGEID_IDX_MASK )
929 * @param a_pPage Pointer to the physical guest page tracking structure.
934 #define PGM_PAGE_GET_TYPE_NA(a_pPage) ( (a_pPage)->s.uTypeY )
936 # define PGM_PAGE_GET_TYPE(a_pPage) __extension__ ({ PGM_PAGE_ASSERT_LOCK(pVM); PGM_PAGE_GET_TYPE_NA(a_pPage); })
945 * @param a_pPage Pointer to the physical guest page tracking structure.
948 #define PGM_PAGE_SET_TYPE(a_pVM, a_pPage, a_enmType) \
949 do { (a_pPage)->s.uTypeY = (a_enmType); PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
954 * @param a_pPage Pointer to the physical guest page tracking structure.
956 #define PGM_PAGE_GET_PTE_INDEX(a_pPage) ( (a_pPage)->s.u10PteIdx )
961 * @param a_pPage Pointer to the physical guest page tracking structure.
964 #define PGM_PAGE_SET_PTE_INDEX(a_pVM, a_pPage, a_iPte) \
965 do { (a_pPage)->s.u10PteIdx = (a_iPte); PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
970 * @param a_pPage Pointer to the physical guest page tracking structure.
972 #define PGM_PAGE_IS_MMIO(a_pPage) ( (a_pPage)->s.uTypeY == PGMPAGETYPE_MMIO )
977 * @param a_pPage Pointer to the physical guest page tracking structure.
979 #define PGM_PAGE_IS_MMIO_OR_ALIAS(a_pPage) ( (a_pPage)->s.uTypeY == PGMPAGETYPE_MMIO \
980 || (a_pPage)->s.uTypeY == PGMPAGETYPE_MMIO2_ALIAS_MMIO \
981 || (a_pPage)->s.uTypeY == PGMPAGETYPE_SPECIAL_ALIAS_MMIO \
987 * @param a_pPage Pointer to the physical guest page tracking structure.
989 #define PGM_PAGE_IS_MMIO_OR_SPECIAL_ALIAS(a_pPage) ( (a_pPage)->s.uTypeY == PGMPAGETYPE_MMIO \
990 || (a_pPage)->s.uTypeY == PGMPAGETYPE_SPECIAL_ALIAS_MMIO )
995 * @param a_pPage Pointer to the physical guest page tracking structure.
997 #define PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(a_pPage) ( (a_pPage)->s.uTypeY == PGMPAGETYPE_SPECIAL_ALIAS_MMIO )
1002 * @param a_pPage Pointer to the physical guest page tracking structure.
1004 #define PGM_PAGE_IS_ZERO(a_pPage) ( (a_pPage)->s.uStateY == PGM_PAGE_STATE_ZERO )
1009 * @param a_pPage Pointer to the physical guest page tracking structure.
1011 #define PGM_PAGE_IS_SHARED(a_pPage) ( (a_pPage)->s.uStateY == PGM_PAGE_STATE_SHARED )
1016 * @param a_pPage Pointer to the physical guest page tracking structure.
1018 #define PGM_PAGE_IS_BALLOONED(a_pPage) ( (a_pPage)->s.uStateY == PGM_PAGE_STATE_BALLOONED )
1023 * @param a_pPage Pointer to the physical guest page tracking structure.
1025 #define PGM_PAGE_IS_ALLOCATED(a_pPage) ( (a_pPage)->s.uStateY == PGM_PAGE_STATE_ALLOCATED )
1030 * @param a_pPage Pointer to the physical guest page tracking structure.
1032 #define PGM_PAGE_SET_WRITTEN_TO(a_pVM, a_pPage) \
1033 do { (a_pPage)->s.fWrittenToY = 1; PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
1038 * @param a_pPage Pointer to the physical guest page tracking structure.
1040 #define PGM_PAGE_CLEAR_WRITTEN_TO(a_pVM, a_pPage) \
1041 do { (a_pPage)->s.fWrittenToY = 0; PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
1046 * @param a_pPage Pointer to the physical guest page tracking structure.
1048 #define PGM_PAGE_IS_WRITTEN_TO(a_pPage) ( (a_pPage)->s.fWrittenToY )
1052 * @param a_pPage Pointer to the physical guest page tracking structure.
1054 #define PGM_PAGE_SET_FT_DIRTY(a_pPage) do { (a_pPage)->s.fFTDirtyY = 1; } while (0)
1058 * @param a_pPage Pointer to the physical guest page tracking structure.
1060 #define PGM_PAGE_CLEAR_FT_DIRTY(a_pPage) do { (a_pPage)->s.fFTDirtyY = 0; } while (0)
1065 * @param a_pPage Pointer to the physical guest page tracking structure.
1067 #define PGM_PAGE_IS_FT_DIRTY(a_pPage) ( (a_pPage)->s.fFTDirtyY )
1086 * @param a_pPage Pointer to the physical guest page tracking structure.
1089 #define PGM_PAGE_SET_PDE_TYPE(a_pVM, a_pPage, a_uType) \
1090 do { (a_pPage)->s.u2PDETypeY = (a_uType); PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
1095 * @param a_pPage Pointer to the physical guest page tracking structure.
1097 #define PGM_PAGE_GET_PDE_TYPE(a_pPage) ( (a_pPage)->s.u2PDETypeY )
1124 * @param a_pPage Pointer to the physical guest page tracking structure.
1126 #define PGM_PAGE_GET_HNDL_PHYS_STATE(a_pPage) ( (a_pPage)->s.u2HandlerPhysStateY )
1130 * @param a_pPage Pointer to the physical guest page tracking structure.
1133 #define PGM_PAGE_SET_HNDL_PHYS_STATE(a_pPage, a_uState) \
1134 do { (a_pPage)->s.u2HandlerPhysStateY = (a_uState); } while (0)
1139 * @param a_pPage Pointer to the physical guest page tracking structure.
1141 #define PGM_PAGE_HAS_ANY_PHYSICAL_HANDLERS(a_pPage) \
1142 ( PGM_PAGE_GET_HNDL_PHYS_STATE(a_pPage) != PGM_PAGE_HNDL_PHYS_STATE_NONE )
1147 * @param a_pPage Pointer to the physical guest page tracking structure.
1149 #define PGM_PAGE_HAS_ACTIVE_PHYSICAL_HANDLERS(a_pPage) \
1150 ( PGM_PAGE_GET_HNDL_PHYS_STATE(a_pPage) >= PGM_PAGE_HNDL_PHYS_STATE_WRITE )
1170 * @param a_pPage Pointer to the physical guest page tracking structure.
1172 #define PGM_PAGE_GET_HNDL_VIRT_STATE(a_pPage) ( (a_pPage)->s.u2HandlerVirtStateY )
1176 * @param a_pPage Pointer to the physical guest page tracking structure.
1179 #define PGM_PAGE_SET_HNDL_VIRT_STATE(a_pPage, a_uState) \
1180 do { (a_pPage)->s.u2HandlerVirtStateY = (a_uState); } while (0)
1185 * @param a_pPage Pointer to the physical guest page tracking structure.
1187 #define PGM_PAGE_HAS_ANY_VIRTUAL_HANDLERS(a_pPage) \
1188 ( PGM_PAGE_GET_HNDL_VIRT_STATE(a_pPage) != PGM_PAGE_HNDL_VIRT_STATE_NONE )
1194 * @param a_pPage Pointer to the physical guest page tracking structure.
1196 #define PGM_PAGE_HAS_ACTIVE_VIRTUAL_HANDLERS(a_pPage) \
1197 PGM_PAGE_HAS_ANY_VIRTUAL_HANDLERS(a_pPage)
1203 * @param a_pPage Pointer to the physical guest page tracking structure.
1206 # define PGM_PAGE_HAS_ANY_HANDLERS(a_pPage) \
1207 ( ((a_pPage)->au32[0] & UINT16_C(0x0303)) != 0 )
1209 # define PGM_PAGE_HAS_ANY_HANDLERS(a_pPage) \
1210 ( PGM_PAGE_GET_HNDL_PHYS_STATE(a_pPage) != PGM_PAGE_HNDL_PHYS_STATE_NONE \
1211 || PGM_PAGE_GET_HNDL_VIRT_STATE(a_pPage) != PGM_PAGE_HNDL_VIRT_STATE_NONE )
1217 * @param a_pPage Pointer to the physical guest page tracking structure.
1220 # define PGM_PAGE_HAS_ACTIVE_HANDLERS(a_pPage) \
1221 ( ((a_pPage)->au32[0] & UINT16_C(0x0202)) != 0 )
1223 # define PGM_PAGE_HAS_ACTIVE_HANDLERS(a_pPage) \
1224 ( PGM_PAGE_GET_HNDL_PHYS_STATE(a_pPage) >= PGM_PAGE_HNDL_PHYS_STATE_WRITE \
1225 || PGM_PAGE_GET_HNDL_VIRT_STATE(a_pPage) >= PGM_PAGE_HNDL_VIRT_STATE_WRITE )
1231 * @param a_pPage Pointer to the physical guest page tracking structure.
1234 # define PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(a_pPage) \
1235 ( ( ((a_pPage)->au8[0] | (a_pPage)->au8[1]) & UINT8_C(0x3) ) \
1238 # define PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(a_pPage) \
1239 ( PGM_PAGE_GET_HNDL_PHYS_STATE(a_pPage) == PGM_PAGE_HNDL_PHYS_STATE_ALL \
1240 || PGM_PAGE_GET_HNDL_VIRT_STATE(a_pPage) == PGM_PAGE_HNDL_VIRT_STATE_ALL )
1247 * @param a_pPage Pointer to the physical guest page tracking structure.
1249 #define PGM_PAGE_GET_TRACKING_NA(a_pPage) ( (a_pPage)->s.u16TrackingY )
1251 # define PGM_PAGE_GET_TRACKING(a_pPage) __extension__ ({ PGM_PAGE_ASSERT_LOCK(pVM); PGM_PAGE_GET_TRACKING_NA(a_pPage); })
1259 * @param a_pPage Pointer to the physical guest page tracking structure.
1262 #define PGM_PAGE_SET_TRACKING(a_pVM, a_pPage, a_u16TrackingData) \
1263 do { (a_pPage)->s.u16TrackingY = (a_u16TrackingData); PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
1268 * @param a_pPage Pointer to the physical guest page tracking structure.
1270 #define PGM_PAGE_GET_TD_CREFS(a_pPage) \
1271 ((PGM_PAGE_GET_TRACKING(a_pPage) >> PGMPOOL_TD_CREFS_SHIFT) & PGMPOOL_TD_CREFS_MASK)
1272 #define PGM_PAGE_GET_TD_CREFS_NA(a_pPage) \
1273 ((PGM_PAGE_GET_TRACKING_NA(a_pPage) >> PGMPOOL_TD_CREFS_SHIFT) & PGMPOOL_TD_CREFS_MASK)
1278 * @param a_pPage Pointer to the physical guest page tracking structure.
1280 #define PGM_PAGE_GET_TD_IDX(a_pPage) \
1281 ((PGM_PAGE_GET_TRACKING(a_pPage) >> PGMPOOL_TD_IDX_SHIFT) & PGMPOOL_TD_IDX_MASK)
1282 #define PGM_PAGE_GET_TD_IDX_NA(a_pPage) \
1283 ((PGM_PAGE_GET_TRACKING_NA(a_pPage) >> PGMPOOL_TD_IDX_SHIFT) & PGMPOOL_TD_IDX_MASK)
1291 * @param a_pPage Pointer to the physical guest page tracking structure.
1293 #define PGM_PAGE_GET_READ_LOCKS(a_pPage) ( (a_pPage)->s.cReadLocksY )
1297 * @param a_pPage Pointer to the physical guest page tracking structure.
1299 #define PGM_PAGE_GET_WRITE_LOCKS(a_pPage) ( (a_pPage)->s.cWriteLocksY )
1302 * @param a_pPage Pointer to the physical guest page tracking structure.
1304 #define PGM_PAGE_DEC_READ_LOCKS(a_pPage) do { --(a_pPage)->s.cReadLocksY; } while (0)
1307 * @param a_pPage Pointer to the physical guest page tracking structure.
1309 #define PGM_PAGE_DEC_WRITE_LOCKS(a_pPage) do { --(a_pPage)->s.cWriteLocksY; } while (0)
1312 * @param a_pPage Pointer to the physical guest page tracking structure.
1314 #define PGM_PAGE_INC_READ_LOCKS(a_pPage) do { ++(a_pPage)->s.cReadLocksY; } while (0)
1317 * @param a_pPage Pointer to the physical guest page tracking structure.
1319 #define PGM_PAGE_INC_WRITE_LOCKS(a_pPage) do { ++(a_pPage)->s.cWriteLocksY; } while (0)
2492 * @param a_pPage The pool page.
2499 # define PGMPOOL_PAGE_2_PTR(a_pVM, a_pPage) pgmPoolMapPageInlined((a_pVM), (a_pPage) RTLOG_COMMA_SRC_POS)
2501 # define PGMPOOL_PAGE_2_PTR(a_pVM, a_pPage) pgmPoolMapPageStrict(a_pPage, __FUNCTION__)
2502 DECLINLINE(void *) pgmPoolMapPageStrict(PPGMPOOLPAGE a_pPage, const char *pszCaller)
2504 AssertPtr(a_pPage);
2505 AssertReleaseMsg(RT_VALID_PTR(a_pPage->pvPageR3), ("enmKind=%d idx=%#x HCPhys=%RHp GCPhys=%RGp caller=%s\n", a_pPage->enmKind, a_pPage->idx, a_pPage->Core.Key, a_pPage->GCPhys, pszCaller));
2506 return a_pPage->pvPageR3;
2509 # define PGMPOOL_PAGE_2_PTR(pVM, a_pPage) ((a_pPage)->pvPageR3)
2519 * @param a_pPage The pool page.
2526 # define PGMPOOL_PAGE_2_PTR_V2(a_pVM, a_pVCpu, a_pPage) pgmPoolMapPageV2Inlined((a_pVM), (a_pVCpu), (a_pPage) RTLOG_COMMA_SRC_POS)
2528 # define PGMPOOL_PAGE_2_PTR_V2(a_pVM, a_pVCpu, a_pPage) PGMPOOL_PAGE_2_PTR((a_pVM), (a_pPage))