xen/5277a134-x86-make-sure-memory-block-is-RAM-before-passing-to-the-allocator.patch

28 lines
984 B
Diff
Raw Normal View History

References: bnc#842417
# Commit 227258983401b7e6091967ffaf22ad83f4ebaf6f
# Date 2013-11-04 14:29:24 +0100
# Author Jan Beulich <jbeulich@suse.com>
# Committer Jan Beulich <jbeulich@suse.com>
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").
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1154,6 +1154,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 )