summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDmitry Skorodumov <sdmitry@parallels.com>2015-07-28 18:38:32 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-10 12:21:57 -0700
commite8647ec68feb66acd35b0f7fa3177bb47cc6a94e (patch)
tree8d6a95a05bc64a0c0896b96df4875d98e1f5b236 /arch
parentc54f557fa580989c304cc5c83528efa5a1819a85 (diff)
downloadlinux-stable-e8647ec68feb66acd35b0f7fa3177bb47cc6a94e.tar.gz
linux-stable-e8647ec68feb66acd35b0f7fa3177bb47cc6a94e.tar.bz2
linux-stable-e8647ec68feb66acd35b0f7fa3177bb47cc6a94e.zip
x86/efi: Use all 64 bit of efi_memmap in setup_e820()
commit 7cc03e48965453b5df1cce5062c826189b04b960 upstream. The efi_info structure stores low 32 bits of memory map in efi_memmap and high 32 bits in efi_memmap_hi. While constructing pointer in the setup_e820(), need to take into account all 64 bit of the pointer. It is because on 64bit machine the function efi_get_memory_map() may return full 64bit pointer and before the patch that pointer was truncated. The issue is triggered on Parallles virtual machine and fixed with this patch. Signed-off-by: Dmitry Skorodumov <sdmitry@parallels.com> Cc: Denis V. Lunev <den@openvz.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/boot/compressed/eboot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 48304b89b601..0cdc154a22b5 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -1193,6 +1193,10 @@ static efi_status_t setup_e820(struct boot_params *params,
unsigned int e820_type = 0;
unsigned long m = efi->efi_memmap;
+#ifdef CONFIG_X86_64
+ m |= (u64)efi->efi_memmap_hi << 32;
+#endif
+
d = (efi_memory_desc_t *)(m + (i * efi->efi_memdesc_size));
switch (d->type) {
case EFI_RESERVED_TYPE: