]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/arm: use p2m_mmio_direct_c to map reserved-memory iomem_cache-wip
authorStefano Stabellini <sstabellini@kernel.org>
Thu, 7 Mar 2019 21:22:10 +0000 (13:22 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 7 Mar 2019 21:22:10 +0000 (13:22 -0800)
Don't use p2m_ram_rw for memory mapped into the guest with iomem, and
for reserved-memory regions. Instead, use p2m_mmio_direct_c which has
very similar pagetable properties but not the same security implications
(p2m_is_ram checks and memory allocations.)

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
xen/arch/arm/domain_build.c
xen/arch/arm/p2m.c

index fb13f5b60a28bb1c154a4f22580874ef52e1bea5..6fcf02c9a82f7482471b510b27db1fb461dabe59 100644 (file)
@@ -1327,7 +1327,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
      * p2m.
      */
     if ( !strcmp(dt_node_name(node), "reserved-memory") )
-        p2mt = p2m_ram_rw;
+        p2mt = p2m_mmio_direct_c;
 
     res = handle_device(d, node, p2mt);
     if ( res)
index 5b8fcc59f5809b40b1262b0e582926fc5fa8abab..3bac5d8d144a518cbba27c0210fb493cc361e81f 100644 (file)
@@ -1076,7 +1076,7 @@ int map_mmio_regions(struct domain *d,
     switch ( cache_policy )
     {
     case CACHEABILITY_MEMORY:
-        t = p2m_ram_rw;
+        t = p2m_mmio_direct_c;
         break;
     case CACHEABILITY_DEVMEM:
         t = p2m_mmio_direct_dev;