ACK: [SRU][J][PATCH 0/1] kexec fails in LPAR when some cpus are disabled (LP: #2075575)
Kuba Pawlak
kuba.pawlak at canonical.com
Tue Apr 15 12:07:08 UTC 2025
On 15.04.2025 13:56, Massimiliano Pellizzer wrote:
> 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.
>
>
Acked-by: Kuba Pawlak <kuba.pawlak at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x216A9D7E3B63DCB4.asc
Type: application/pgp-keys
Size: 3139 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250415/be072452/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250415/be072452/attachment.sig>
More information about the kernel-team
mailing list