xen: arm: map entire memory banks on arm64
authorIan Campbell <ian.campbell@citrix.com>
Thu, 10 Oct 2013 14:43:42 +0000 (15:43 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 24 Oct 2013 13:23:56 +0000 (14:23 +0100)
Currently we only map regions which are not part of boot modules. However we
subsequently free at least some of those modules to the heaps in
discard_initial_modules and if we were unluckly with sizing/location we might
end up adding unmapped pages to the heap.

The heaps on 64-bit use 1GB mappings, so in practice this is probably pretty
unlikely and I've not actually seen it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/setup.c

index 7d6e596b6216f2098177e3a8e84baed5970ae551..1081b43c49839406d61551afbf8fb69d11da58aa 100644 (file)
@@ -520,6 +520,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
 
         xenheap_pages += (bank_size >> PAGE_SHIFT);
 
+        setup_xenheap_mappings(bank_start>>PAGE_SHIFT, bank_size>>PAGE_SHIFT);
+
         /* XXX we assume that the ram regions are ordered */
         s = bank_start;
         while ( s < bank_end )
@@ -536,8 +538,6 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
             if ( e > bank_end )
                 e = bank_end;
 
-            setup_xenheap_mappings(s>>PAGE_SHIFT, (e-s)>>PAGE_SHIFT);
-
             xenheap_mfn_end = e;
 
             dt_unreserved_regions(s, e, init_boot_pages, 0);