Skip to contentSkip to conversation

x86: make sure memory block is RAM before passing to the allocator

PATCH In review Jan Beulich 2 participants 2 messages Nov 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: make sure memory block is RAM before passing to the allocator

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").

xen/arch/x86/setup.c +2 -0
@@ -1155,6 +1155,8 @@ void __init __start_xen(unsigned long mb
         {
             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 )

x86: make sure memory block is RAM before passing to the allocator

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").

xen/arch/x86/setup.c +2 -0
@@ -1155,6 +1155,8 @@ void __init __start_xen(unsigned long mb
         {
             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 )

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jan Beulich

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").

Quoted 18 lines
xen/arch/x86/setup.c +2 -0
@@ -1155,6 +1155,8 @@ void __init __start_xen(unsigned long mb
         {
             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 )

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel