Skip to contentSkip to conversation

x86-crash-add-x86-crash-hotplug-support.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Aug 24, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: x86/crash: add x86 crash hotplug support
has been removed from the -mm tree. Its filename was
x86-crash-add-x86-crash-hotplug-support.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Eric DeVolder <[email protected]>
Subject: x86/crash: add x86 crash hotplug support
Date: Mon, 14 Aug 2023 17:44:43 -0400

When CPU or memory is hot un/plugged, or off/onlined, the crash elfcorehdr, which describes the CPUs and memory in the system, must also be updated.

A new elfcorehdr is generated from the available CPUs and memory and replaces the existing elfcorehdr. The segment containing the elfcorehdr is identified at run-time in crash_core:crash_handle_hotplug_event().

No modifications to purgatory (see 'kexec: exclude elfcorehdr from the segment digest') or boot_params (as the elfcorehdr= capture kernel command line parameter pointer remains unchanged and correct) are needed, just elfcorehdr.

For kexec_file_load(), the elfcorehdr segment size is based on NR_CPUS and CRASH_MAX_MEMORY_RANGES in order to accommodate a growing number of CPU and memory resources.

For kexec_load(), the userspace kexec utility needs to size the elfcorehdr segment in the same/similar manner.

To accommodate kexec_load() syscall in the absence of kexec_file_load() syscall support, prepare_elf_headers() and dependents are moved outside of CONFIG_KEXEC_FILE.

[[email protected]: correct unused function build error]
Cc Akhil Raj <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Borislav Petkov (AMD) <[email protected]>
Cc Boris Ostrovsky <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Dave Young <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Eric W. Biederman <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Mimi Zohar <[email protected]>
Cc Naveen N. Rao <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Thomas Weißschuh <[email protected]>
Cc Valentin Schneider <[email protected]>
Cc Vivek Goyal <[email protected]>
Cc Vlastimil Babka <[email protected]>

---

 arch/x86/Kconfig             |    3 
 arch/x86/include/asm/kexec.h |   15 ++++
 arch/x86/kernel/crash.c      |  105 ++++++++++++++++++++++++++++++---
 3 files changed, 116 insertions(+), 7 deletions(-)
arch/x86/include/asm/kexec.h renamed from arch/x86/include/asm/kexec.h~x86-crash-add-x86-crash-hotplug-support +15 -0
@@ -209,6 +209,21 @@ typedef void crash_vmclear_fn(void);
 extern crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss;
 extern void kdump_nmi_shootdown_cpus(void);
 
+#ifdef CONFIG_CRASH_HOTPLUG
+void arch_crash_handle_hotplug_event(struct kimage *image);
+#define arch_crash_handle_hotplug_event arch_crash_handle_hotplug_event
+
+#ifdef CONFIG_HOTPLUG_CPU
+static inline int crash_hotplug_cpu_support(void) { return 1; }
+#define crash_hotplug_cpu_support crash_hotplug_cpu_support
+#endif
+
+#ifdef CONFIG_MEMORY_HOTPLUG
+static inline int crash_hotplug_memory_support(void) { return 1; }
+#define crash_hotplug_memory_support crash_hotplug_memory_support
+#endif
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_X86_KEXEC_H */
arch/x86/Kconfig renamed from arch/x86/Kconfig~x86-crash-add-x86-crash-hotplug-support +3 -0
@@ -2069,6 +2069,9 @@ config ARCH_SUPPORTS_KEXEC_JUMP
 config ARCH_SUPPORTS_CRASH_DUMP
 	def_bool X86_64 || (X86_32 && HIGHMEM)
 
+config ARCH_SUPPORTS_CRASH_HOTPLUG
+	def_bool y
+
 config PHYSICAL_START
 	hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
 	default "0x1000000"
arch/x86/kernel/crash.c renamed from arch/x86/kernel/crash.c~x86-crash-add-x86-crash-hotplug-support +98 -7

147 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are