@@ -1145,7 +1145,7 @@ int xenmem_add_to_physmap_one(
if ( extra.res0 )
return -EOPNOTSUPP;
- rc = map_dev_mmio_region(d, gfn_x(gfn), 1, idx);
+ rc = map_dev_mmio_region(d, gfn, 1, _mfn(idx));
return rc;
default:
@@ -1211,20 +1211,20 @@ int unmap_mmio_regions(struct domain *d,
}
int map_dev_mmio_region(struct domain *d,
- unsigned long start_gfn,
+ gfn_t gfn,
unsigned long nr,
- unsigned long mfn)
+ mfn_t mfn)
{
int res;
- if ( !(nr && iomem_access_permitted(d, mfn, mfn + nr - 1)) )
+ if ( !(nr && iomem_access_permitted(d, mfn_x(mfn), mfn_x(mfn) + nr - 1)) )
return 0;
- res = map_mmio_regions(d, _gfn(start_gfn), nr, _mfn(mfn));
+ res = map_mmio_regions(d, gfn, nr, mfn);
if ( res < 0 )
{
- printk(XENLOG_G_ERR "Unable to map [%#lx - %#lx] in Dom%d\n",
- mfn, mfn + nr - 1, d->domain_id);
+ printk(XENLOG_G_ERR "Unable to map MFNs [%#"PRI_mfn" - %#"PRI_mfn" in Dom%d\n",
+ mfn_x(mfn), mfn_x(mfn) + nr - 1, d->domain_id);
return res;
}
@@ -152,9 +152,9 @@ int unmap_regions_rw_cache(struct domain *d,
unsigned long mfn);
int map_dev_mmio_region(struct domain *d,
- unsigned long start_gfn,
+ gfn_t gfn,
unsigned long nr,
- unsigned long mfn);
+ mfn_t mfn);
int guest_physmap_add_entry(struct domain *d,
gfn_t gfn,
to avoid mixing machine frame with guest frame. Also drop the prefix start_. Signed-off-by: Julien Grall <julien.grall@arm.com> --- Changes in v6: - Qualify what is being mapped - Use PRI_mfn Changes in v4: - Patch added --- xen/arch/arm/mm.c | 2 +- xen/arch/arm/p2m.c | 12 ++++++------ xen/include/asm-arm/p2m.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-)