@@ -1283,7 +1283,7 @@ int xenmem_add_to_physmap_one(
}
mfn = page_to_mfn(page);
- t = p2m_map_foreign;
+ t = p2m_map_foreign_rw;
rcu_unlock_domain(od);
break;
@@ -440,7 +440,7 @@ static void p2m_set_permission(lpae_t *e, p2m_type_t t, p2m_access_t a)
break;
case p2m_iommu_map_rw:
- case p2m_map_foreign:
+ case p2m_map_foreign_rw:
case p2m_grant_map_rw:
case p2m_mmio_direct_dev:
case p2m_mmio_direct_nc:
@@ -117,7 +117,7 @@ enum p2m_type {
p2m_mmio_direct_dev,/* Read/write mapping of genuine Device MMIO area */
p2m_mmio_direct_nc, /* Read/write mapping of genuine MMIO area non-cacheable */
p2m_mmio_direct_c, /* Read/write mapping of genuine MMIO area cacheable */
- p2m_map_foreign, /* Ram pages from foreign domain */
+ p2m_map_foreign_rw, /* Read/write RAM pages from foreign domain */
p2m_grant_map_rw, /* Read/write grant mapping */
p2m_grant_map_ro, /* Read-only grant mapping */
/* The types below are only used to decide the page attribute in the P2M */
@@ -139,10 +139,10 @@ enum p2m_type {
/* Useful predicates */
#define p2m_is_ram(_t) (p2m_to_mask(_t) & P2M_RAM_TYPES)
-#define p2m_is_foreign(_t) (p2m_to_mask(_t) & p2m_to_mask(p2m_map_foreign))
+#define p2m_is_foreign(_t) (p2m_to_mask(_t) & p2m_to_mask(p2m_map_foreign_rw))
#define p2m_is_any_ram(_t) (p2m_to_mask(_t) & \
(P2M_RAM_TYPES | P2M_GRANT_TYPES | \
- p2m_to_mask(p2m_map_foreign)))
+ p2m_to_mask(p2m_map_foreign_rw)))
static inline
void p2m_altp2m_check(struct vcpu *v, uint16_t idx)
A follow-up patch will introduce another type of foreign mapping. Rename the type to make clear it is only used for read-write mapping. No functional changes intended. Signed-off-by: Julien Grall <julien.grall@arm.com> --- xen/arch/arm/mm.c | 2 +- xen/arch/arm/p2m.c | 2 +- xen/include/asm-arm/p2m.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)