xen: do not create the extra e820 region at an addr lower than 4G
authorStefano Stabellini <[email protected]>
Tue, 12 Apr 2011 11:19:52 +0000 (12:19 +0100)
committerKonrad Rzeszutek Wilk <[email protected]>
Wed, 20 Apr 2011 13:04:40 +0000 (09:04 -0400)
Do not add the extra e820 region at a physical address lower than 4G
because it breaks e820_end_of_low_ram_pfn().

It is OK for us to move the xen_extra_mem_start up and down because this
is the index of the memory that can be ballooned in/out - it is memory
not available to the kernel during bootup.

Signed-off-by: Stefano Stabellini <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
arch/x86/xen/setup.c

index fa0269a993773f8488f765c3a1e255ba59fd4e3f..90bac0aac3a5d42f3c45b48c3980e0fb432eee03 100644 (file)
@@ -227,7 +227,7 @@ char * __init xen_memory_setup(void)
 
        memcpy(map_raw, map, sizeof(map));
        e820.nr_map = 0;
-       xen_extra_mem_start = mem_end;
+       xen_extra_mem_start = max((1ULL << 32), mem_end);
        for (i = 0; i < memmap.nr_entries; i++) {
                unsigned long long end;