Blame SOURCES/kexec-tools-2.0.14-x86-Support-large-number-of-memory-ranges.patch

23ef29
From 4a6d67d9e938a7accf128aff23f8ad4bda67f729 Mon Sep 17 00:00:00 2001
23ef29
From: Xunlei Pang <xlpang@redhat.com>
23ef29
Date: Thu, 23 Mar 2017 19:16:59 +0800
23ef29
Subject: [PATCH] x86: Support large number of memory ranges
23ef29
23ef29
We got a problem on one SGI 64TB machine, the current kexec-tools
23ef29
failed to work due to the insufficient ranges(MAX_MEMORY_RANGES)
23ef29
allowed which is defined as 1024(less than the ranges on the machine).
23ef29
The kcore header is insufficient due to the same reason as well.
23ef29
23ef29
To solve this, this patch simply doubles "MAX_MEMORY_RANGES" and
23ef29
"KCORE_ELF_HEADERS_SIZE".
23ef29
23ef29
Signed-off-by: Xunlei Pang <xlpang@redhat.com>
23ef29
Tested-by: Frank Ramsay <frank.ramsay@hpe.com>
23ef29
Signed-off-by: Simon Horman <horms@verge.net.au>
23ef29
---
23ef29
 kexec/arch/i386/kexec-x86.h | 2 +-
23ef29
 kexec/crashdump.h           | 4 ++--
23ef29
 2 files changed, 3 insertions(+), 3 deletions(-)
23ef29
23ef29
diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h
23ef29
index 33df352..51855f8 100644
23ef29
--- a/kexec/arch/i386/kexec-x86.h
23ef29
+++ b/kexec/arch/i386/kexec-x86.h
23ef29
@@ -1,7 +1,7 @@
23ef29
 #ifndef KEXEC_X86_H
23ef29
 #define KEXEC_X86_H
23ef29
 
23ef29
-#define MAX_MEMORY_RANGES 1024
23ef29
+#define MAX_MEMORY_RANGES 2048
23ef29
 
23ef29
 enum coretype {
23ef29
 	CORE_TYPE_UNDEF = 0,
23ef29
diff --git a/kexec/crashdump.h b/kexec/crashdump.h
23ef29
index 86e1ef2..18bd691 100644
23ef29
--- a/kexec/crashdump.h
23ef29
+++ b/kexec/crashdump.h
23ef29
@@ -7,8 +7,8 @@ extern int get_xen_vmcoreinfo(uint64_t *addr, uint64_t *len);
23ef29
 
23ef29
 /* Need to find a better way to determine per cpu notes section size. */
23ef29
 #define MAX_NOTE_BYTES		1024
23ef29
-/* Expecting ELF headers to fit in 32K. Increase it if you need more. */
23ef29
-#define KCORE_ELF_HEADERS_SIZE  32768
23ef29
+/* Expecting ELF headers to fit in 64K. Increase it if you need more. */
23ef29
+#define KCORE_ELF_HEADERS_SIZE  65536
23ef29
 /* The address of the ELF header is passed to the secondary kernel
23ef29
  * using the kernel command line option memmap=nnn.
23ef29
  * The smallest unit the kernel accepts is in kilobytes,
23ef29
-- 
23ef29
1.8.3.1
23ef29