]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/arm: allow domUs to iomap reserved-memory regions stable-4.13
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Tue, 3 Dec 2019 02:32:19 +0000 (18:32 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 4 Dec 2019 23:58:10 +0000 (15:58 -0800)
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
xen/arch/arm/domain_build.c

index dd9c3b73bab921415d5ade1dbe04b8e8771a0777..f54f2385be5439fde5f37a4c4e23d65ef539c0d5 100644 (file)
@@ -1212,24 +1212,15 @@ static int __init map_range_to_domain(const struct dt_device_node *dev,
     bool need_mapping = !dt_device_for_passthrough(dev);
     int res;
 
-    /*
-     * reserved-memory regions are RAM carved out for a special purpose.
-     * They are not MMIO and therefore a domain should not be able to
-     * manage them via the IOMEM interface.
-     */
-    if ( strnicmp(dt_node_full_name(dev), "/reserved-memory/",
-         strlen("/reserved-memory/")) != 0 )
+    res = iomem_permit_access(d, paddr_to_pfn(addr),
+            paddr_to_pfn(PAGE_ALIGN(addr + len - 1)));
+    if ( res )
     {
-        res = iomem_permit_access(d, paddr_to_pfn(addr),
-                paddr_to_pfn(PAGE_ALIGN(addr + len - 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 + len) - 1);
-            return 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 + len) - 1);
+        return res;
     }
 
     if ( need_mapping )