[SRU][J][PATCH 0/1] kexec fails in LPAR when some cpus are disabled (LP: #2075575)
Massimiliano Pellizzer
massimiliano.pellizzer at canonical.com
Tue Apr 15 11:56:37 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2075575
[ Impact ]
powerpc/pseries: Fix scv instruction crash with kexec
kexec on pseries disables AIL (reloc_on_exc), required for scv
instruction support, before other CPUs have been shut down. This means
they can execute scv instructions after AIL is disabled, which causes an
interrupt at an unexpected entry location that crashes the kernel.
Change the kexec sequence to disable AIL after other CPUs have been
brought down.
As a refresher, the real-mode scv interrupt vector is 0x17000, and the
fixed-location head code probably couldn't easily deal with implementing
such high addresses so it was just decided not to support that interrupt
at all.
[ Fix ]
Backport the following commit:
- 21a741eb75f8 powerpc/pseries: Fix scv instruction crash with kexec
from upstream.
[ Test Plan ]
Repro steps:
1. Boot into an L1 lpar
2. Disable some cpus (eg: ppc64_cpu --cores-on=3)
3. Try to kexec.
This bug is reproducible only when we load the target kernel/initrd and use
"kexec -e" as follows:
kexec -l --initrd initramfs-$(uname -r).img vmlinuz-$(uname -r) --append="$(cat
/proc/cmdline)"
kexec -e
kexec works fine if we do a normal kexec without skipping the shutdown path
kexec --initrd initramfs-$(uname -r).img vmlinuz-$(uname -r) --append="$(cat
/proc/cmdline)"
[ Where problems could occur ]
The fix affects the PowerPC pSeries kexec sequence.
A problem with this fix may manifest as system instability
during a kexec transition, unexpected exceptions in early boot of the new
kernel, or complete system crashes when attempting to perform a kernel reboot
via kexec.
More information about the kernel-team
mailing list