linux/arch/powerpc/kexec
Nicholas Piggin 21a741eb75 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.

Fixes: 7fa95f9ada ("powerpc/64s: system call support for scv/rfscv instructions")
Cc: stable@vger.kernel.org # v5.9+
Reported-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Closes: https://lore.kernel.org/3b4b2943-49ad-4619-b195-bc416f1d1409@linux.ibm.com
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Gautam Menghani <gautam@linux.ibm.com>
Tested-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Link: https://msgid.link/20240625134047.298759-1-npiggin@gmail.com
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2024-06-28 22:05:44 +10:00
..
core_32.c powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
core_64.c powerpc/pseries: Fix scv instruction crash with kexec 2024-06-28 22:05:44 +10:00
core.c powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency 2024-03-17 13:34:00 +11:00
crash.c powerpc/crash: remove unnecessary NULL check before kvfree() 2024-05-03 12:20:50 +10:00
elf_64.c powerpc/crash: add crash CPU hotplug support 2024-04-23 15:00:04 +10:00
file_load_64.c powerpc/crash: add crash memory hotplug support 2024-04-23 15:00:04 +10:00
file_load.c powerpc: Delete unused function delete_fdt_mem_rsv() 2021-03-08 12:06:30 -07:00
Makefile powerpc/kexec: move *_memory_ranges functions to ranges.c 2024-04-23 14:59:01 +10:00
ranges.c powerpc/crash: add crash memory hotplug support 2024-04-23 15:00:04 +10:00
relocate_32.S powerpc/32: Curb objtool unannotated intra-function call warning 2024-03-03 22:20:28 +11:00
vmcore_info.c arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00