[RFC v1 6/8] crash hp: Add x86 crash hotplug state items to kimage

From: Eric DeVolder
Date: Thu Nov 18 2021 - 12:51:05 EST


To facilitate hotplug updates of the crash elfcorehdr, a few members
are added to the kimage arch struct.

The indices of the elfcorehdr and purgatory segments are recorded
here so that upon a hotplug event, those segments can be efficiently
located and updated accordingly.

The purgatory image also requires a few register context values in
order to transition from purgatory to the next/capture kernel.

Signed-off-by: Eric DeVolder <eric.devolder@xxxxxxxxxx>
---
arch/x86/include/asm/kexec.h | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h
index 11b7c06e2828..b08fe56239c8 100644
--- a/arch/x86/include/asm/kexec.h
+++ b/arch/x86/include/asm/kexec.h
@@ -150,6 +150,16 @@ struct kimage_arch {
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
+#ifdef CONFIG_CRASH_HOTPLUG
+ struct {
+ int elf_index;
+ int purg_index;
+ unsigned long rbx;
+ unsigned long rsi;
+ unsigned long rip;
+ unsigned long rsp;
+ } hp;
+#endif
};
#endif /* CONFIG_X86_32 */

--
2.27.0