qemu-e2k/target/ppc
Nicholas Piggin c8fd9667e5 target/ppc: Fix crash on machine check caused by ifetch
is_prefix_insn_excp() loads the first word of the instruction address
which caused an exception, to determine whether or not it was prefixed
so the prefix bit can be set in [H]SRR1.

This works if the instruction image can be loaded, but if the exception
was caused by an ifetch, this load could fail and cause a recursive
exception and crash. Machine checks caused by ifetch are not excluded
from the prefix check and can crash (see issue 2108 for an example).

Fix this by excluding machine checks caused by ifetch from the prefix
check.

Cc: qemu-stable@nongnu.org
Acked-by: Cédric Le Goater <clg@kaod.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2108
Fixes: 55a7fa34f8 ("target/ppc: Machine check on invalid real address access on POWER9/10")
Fixes: 5a5d3b23cb ("target/ppc: Add SRR1 prefix indication to interrupt handlers")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
2024-02-23 23:16:34 +10:00
..
translate target/ppc: Fix lxv/stxv MSR facility check 2024-02-23 23:16:34 +10:00
arch_dump.c
compat.c spapr: Fix machine reset deadlock from replay-record 2023-09-06 11:19:33 +02:00
cpu_init.c target/ppc: Populate CPUClass.mmu_index 2024-02-03 16:46:10 +10:00
cpu-models.c target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules 2024-02-05 14:21:21 +01:00
cpu-models.h ppc: spelling fixes 2023-09-20 07:54:34 +03:00
cpu-param.h
cpu-qom.h target/ppc: Move powerpc_input_t definition to 'cpu.h' 2023-11-07 12:13:28 +01:00
cpu.c target/ppc: Flush inputs to zero with NJ in ppc_store_vscr 2023-09-06 11:19:33 +02:00
cpu.h include/exec: Implement cpu_mmu_index generically 2024-02-03 16:46:10 +10:00
dfp_helper.c
excp_helper.c target/ppc: Fix crash on machine check caused by ifetch 2024-02-23 23:16:34 +10:00
fpu_helper.c target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros 2023-11-21 08:39:58 +01:00
gdbstub.c target/ppc: Remove references to gdb_has_xml 2023-10-11 08:46:33 +01:00
helper_regs.c qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to BQL_LOCK_GUARD 2024-01-08 10:45:43 -05:00
helper_regs.h
helper.h
insn32.decode
insn64.decode
int_helper.c target/ppc: Rename variables to avoid local variable shadowing in VUPKPX 2023-10-06 10:56:54 +02:00
internal.h target/ppc: Define powerpc_pm_insn_t in 'internal.h' 2023-11-07 12:13:28 +01:00
Kconfig
kvm_ppc.h target/ppc: Prohibit target specific KVM prototypes on user emulation 2023-11-07 12:13:28 +01:00
kvm.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
machine.c target/ppc: Constify VMState in machine.c 2023-12-29 11:17:30 +11:00
mem_helper.c target/ppc: Split out ppc_env_mmu_index 2024-02-03 16:46:10 +10:00
meson.build target/ppc: Restrict KVM objects to system emulation 2023-11-07 12:13:28 +01:00
misc_helper.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
mmu_common.c target/ppc: Split out ppc_env_mmu_index 2024-02-03 16:46:10 +10:00
mmu_helper.c
mmu-book3s-v3.c
mmu-book3s-v3.h
mmu-books.h
mmu-hash32.c
mmu-hash32.h
mmu-hash64.c
mmu-hash64.h
mmu-radix64.c
mmu-radix64.h
power8-pmu-regs.c.inc tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
power8-pmu.c
power8-pmu.h
ppc-qmp-cmds.c target: Use generic cpu_model_from_type() 2024-01-05 16:20:14 +01:00
spr_common.h
tcg-stub.c
timebase_helper.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
trace-events
trace.h
translate.c target: Use vaddr in gen_intermediate_code 2024-01-29 07:06:03 +10:00
user_only_helper.c