[RFC PATCH 0/7] x86/kexec: Add exception handling for relocate_kernel
David Woodhouse
dwmw2 at infradead.org
Sat Nov 2 22:35:25 PDT 2024
Page faults in relocate_kernel() are extremely painful to debug. Provide a
basic exception handler which will just dump the exception information and
registers to a serial port.
It's disabled by default and has to be enabled with #define DEBUG.
While I was at it, I also stopped swap_pages from actually swapping pages
in the case of a plain kexec without preserve_context. Unless I'm missing
something, that's just a pointless waste of time.
David Woodhouse (7):
x86/kexec: Clean up and document register use in relocate_kernel_64.S
x86/kexec: Use named labels in swap_pages in relocate_kernel_64.S
x86/kexec: Only swap pages for preserve_context mode
x86/kexec: Debugging support: load a GDT
x86/kexec: Debugging support: Load an IDT and basic exception entry points
x86/kexec: Debugging support: Dump registers on exception
arch/x86/kernel/relocate_kernel_64.S | 265 ++++++++++++++++++++++++++++++++---
1 file changed, 246 insertions(+), 19 deletions(-)
More information about the kexec
mailing list