From: Konrad Rzeszutek Wilk Date: Tue, 12 Apr 2011 11:57:15 +0000 (-0400) Subject: xen/setup: Ignore E820_UNUSABLE when setting 1-1 mappings. X-Git-Tag: v2.6.39.1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d97559675bcba247e705712800ccd2c6d3674f1;p=thirdparty%2Fkernel%2Fstable.git xen/setup: Ignore E820_UNUSABLE when setting 1-1 mappings. commit 15bfc094517db2ddf38ca7ed47f3a1c0ad24f7c4 upstream. When we parse the raw E820, the Xen hypervisor can set "E820_RAM" to "E820_UNUSABLE" if the mem=X argument is used. As such we should _not_ consider the E820_UNUSABLE as an 1-1 identity mapping, but instead use the same case as for E820_RAM. Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 721f5760783b5..ca6297bd4e3c7 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -166,7 +166,7 @@ static unsigned long __init xen_set_identity(const struct e820entry *list, if (last > end) continue; - if (entry->type == E820_RAM) { + if ((entry->type == E820_RAM) || (entry->type == E820_UNUSABLE)) { if (start > start_pci) identity += set_phys_range_identity( PFN_UP(start_pci), PFN_DOWN(start));