summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/setup.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-01-19 11:08:05 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2015-10-23 14:20:03 +0100
commitf5775e0b6116b7e2425ccf535243b21768566d87 (patch)
tree2d7d0aaa736c20fbf20757f244b2d233d6150fc8 /arch/x86/xen/setup.c
parentf6a6cb1afe74d6ccc81aa70aa4ac3953762e7e6e (diff)
downloadlinux-f5775e0b6116b7e2425ccf535243b21768566d87.tar.bz2
x86/xen: discard RAM regions above the maximum reservation
During setup, discard RAM regions that are above the maximum reservation (instead of marking them as E820_UNUSABLE). This allows hotplug memory to be placed at these addresses. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Diffstat (limited to 'arch/x86/xen/setup.c')
-rw-r--r--arch/x86/xen/setup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 1c30e4ab1022..387b60d9bd0e 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -829,6 +829,8 @@ char * __init xen_memory_setup(void)
addr = xen_e820_map[0].addr;
size = xen_e820_map[0].size;
while (i < xen_e820_map_entries) {
+ bool discard = false;
+
chunk_size = size;
type = xen_e820_map[i].type;
@@ -843,10 +845,11 @@ char * __init xen_memory_setup(void)
xen_add_extra_mem(pfn_s, n_pfns);
xen_max_p2m_pfn = pfn_s + n_pfns;
} else
- type = E820_UNUSABLE;
+ discard = true;
}
- xen_align_and_add_e820_region(addr, chunk_size, type);
+ if (!discard)
+ xen_align_and_add_e820_region(addr, chunk_size, type);
addr += chunk_size;
size -= chunk_size;