From: David Woodhouse Date: Sun, 24 Nov 2024 15:30:18 +0000 (+0000) Subject: x86/kexec: Add CONFIG_KEXEC_DEBUG option X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=39af1fd453589392d4a59e51d09ee4035d5f48f1;p=users%2Fdwmw2%2Flinux.git x86/kexec: Add CONFIG_KEXEC_DEBUG option This does nothing yet. Support for x86_64 will follow in subsequent commits, and an Arm64 version is also being worked on. Signed-off-by: David Woodhouse --- diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 74777a97e394a..c54cbd36c7102 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -13,6 +13,7 @@ config X86_VERBOSE_BOOTUP config EARLY_PRINTK bool "Early printk" if EXPERT + select HAVE_KEXEC_DEBUG if X86_64 default y help Write kernel log output directly into the VGA buffer or to a serial diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec index 4d111f8719516..a65b49c083c90 100644 --- a/kernel/Kconfig.kexec +++ b/kernel/Kconfig.kexec @@ -17,6 +17,9 @@ config KEXEC_ELF config HAVE_IMA_KEXEC bool +config HAVE_KEXEC_DEBUG + bool + config KEXEC bool "Enable kexec system call" depends on ARCH_SUPPORTS_KEXEC @@ -95,6 +98,14 @@ config KEXEC_JUMP Jump between original kernel and kexeced kernel and invoke code in physical address mode via KEXEC +config KEXEC_DEBUG + bool "Debug kexec transition" + depends on HAVE_KEXEC_DEBUG + help + Faults during kexec can be difficult to debug. This installs exception + handlers and attempts to report faults. On x86_64 this would use the + serial port configured for earlyprintk. + config CRASH_DUMP bool "kernel crash dumps" default ARCH_DEFAULT_CRASH_DUMP