diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 46a3619871..9d9cba959a 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -763,6 +764,16 @@ static int map_device(struct domain *d, struct dt_device_node *dev) DPRINT("addr %u = 0x%"PRIx64" - 0x%"PRIx64"\n", i, addr, addr + size - 1); + res = iomem_permit_access(d, paddr_to_pfn(addr & PAGE_MASK), + paddr_to_pfn(PAGE_ALIGN(addr + size - 1))); + if ( res ) + { + printk(XENLOG_ERR "Unable to permit to dom%d access to" + " 0x%"PRIx64" - 0x%"PRIx64"\n", + d->domain_id, + addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1); + return res; + } res = map_mmio_regions(d, addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1, addr & PAGE_MASK);