xen/arm: call iomem_permit_access for passthrough devices

iomem_permit_access should be called for MMIO regions of devices
assigned to a domain. Currently it is not called for MMIO regions of
passthrough devices of Dom0less guests. This patch fixes it.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Julien Grall <julien@xen.org>
(cherry picked from commit 6b75c7a954)
This commit is contained in:
Stefano Stabellini committed 2021-03-19 12:20:52 -07:00
1 parent 8505e8a10e
commit a702c80ec1
1 file changed
+11
+11
View File
@@ -1798,6 +1798,17 @@ static int __init handle_passthrough_prop(struct kernel_info *kinfo,
return -EINVAL;
}
res = iomem_permit_access(kinfo->d, paddr_to_pfn(mstart),
paddr_to_pfn(PAGE_ALIGN(mstart + size - 1)));
if ( res )
{
printk(XENLOG_ERR "Unable to permit to dom%d access to"
" 0x%"PRIx64" - 0x%"PRIx64"\n",
kinfo->d->domain_id,
mstart & PAGE_MASK, PAGE_ALIGN(mstart + size) - 1);
return res;
}
res = map_regions_p2mt(kinfo->d,
gaddr_to_gfn(gstart),
PFN_DOWN(size),
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.