x86: make sure memory block is RAM before passing to the allocator
authorJan Beulich <jbeulich@suse.com>
Mon, 4 Nov 2013 13:29:24 +0000 (14:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Nov 2013 13:29:24 +0000 (14:29 +0100)
Memory blocks outside of the always visible 1:1 mapping range get
passed to the allocator separately (once enough other setup was done).
Skipping non-RAM regions, however, was forgotten in adc5afbf ("x86:
support up to 16Tb").

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/setup.c

index 30a4fd6b88d543d2cca9f565dd6efb37146aa17a..5bf4ee0b2def1eb8ca4d21b6b876283cfdbf7a71 100644 (file)
@@ -1155,6 +1155,8 @@ void __init __start_xen(unsigned long mbi_p)
         {
             uint64_t s, e;
 
+            if ( boot_e820.map[i].type != E820_RAM )
+                continue;
             s = (boot_e820.map[i].addr + mask) & ~mask;
             e = (boot_e820.map[i].addr + boot_e820.map[i].size) & ~mask;
             if ( PFN_DOWN(e) <= limit )