qemu/target/ppc
Nicholas Piggin 434531619f target/ppc: Do not clear MSR[ME] on MCE interrupts to supervisor
Hardware clears the MSR[ME] bit when delivering a machine check
interrupt, so that is what QEMU does.

The spapr environment runs in supervisor mode though, and receives
machine check interrupts after they are processed by the hypervisor,
and MSR[ME] must always be enabled in supervisor mode (otherwise it
could checkstop the system). So MSR[ME] must not be cleared when
delivering machine checks to the supervisor.

The fix to prevent supervisor mode from modifying MSR[ME] also
prevented it from re-enabling the incorrectly cleared MSR[ME] bit
when returning from handling the interrupt. Before that fix, the
problem was not very noticable with well-behaved code. So the
Fixes tag is not strictly correct, but practically they go together.

Found by kvm-unit-tests machine check tests (not yet upstream).

Fixes: 678b6f1af7 ("target/ppc: Prevent supervisor from modifying MSR[ME]")
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
2024-03-30 18:50:25 +10:00
..
translate target/ppc: Move add and subf type fixed-point arithmetic instructions to decodetree 2024-03-13 02:47:04 +10:00
arch_dump.c
compat.c
cpu_init.c target/ppc: Restore [H]DEXCR to 64-bits 2024-03-30 18:50:24 +10:00
cpu-models.c ppc: Drop support for POWER9 and POWER10 DD1 chips 2024-03-13 02:47:04 +10:00
cpu-models.h
cpu-param.h
cpu-qom.h
cpu.c
cpu.h spapr: nested: Introduce H_GUEST_RUN_VCPU hcall. 2024-03-13 02:47:04 +10:00
dfp_helper.c
excp_helper.c target/ppc: Do not clear MSR[ME] on MCE interrupts to supervisor 2024-03-30 18:50:25 +10:00
fpu_helper.c
gdbstub.c target/ppc: Fix GDB register indexing on secondary CPUs 2024-03-30 18:50:24 +10:00
helper_regs.c target/ppc: Prevent supervisor from modifying MSR[ME] 2024-03-13 02:47:04 +10:00
helper_regs.h
helper.h
insn32.decode target/ppc: Move add and subf type fixed-point arithmetic instructions to decodetree 2024-03-13 02:47:04 +10:00
insn64.decode
int_helper.c
internal.h
Kconfig
kvm_ppc.h
kvm.c * PAPR nested hypervisor host implementation for spapr TCG 2024-03-13 12:37:27 +00:00
machine.c
mem_helper.c
meson.build
misc_helper.c ppc/pnv: Improve pervasive topology calculation for big-core 2024-03-13 02:47:04 +10:00
mmu_common.c
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 target/ppc/mmu-radix64: Use correct string format in walk_tree() 2024-03-30 18:50:23 +10:00
mmu-radix64.h
power8-pmu-regs.c.inc
power8-pmu.c
power8-pmu.h
ppc-qmp-cmds.c target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
spr_common.h
tcg-stub.c
timebase_helper.c
trace-events
trace.h
translate.c target/ppc: Add gen_exception_err_nip() function 2024-03-13 02:47:04 +10:00
user_only_helper.c target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00