qemu-e2k/target/ppc
Cédric Le Goater 9a94ee5bb1 spapr/rtas: disable the decrementer interrupt when a CPU is unplugged
When a CPU is stopped with the 'stop-self' RTAS call, its state
'halted' is switched to 1 and, in this case, the MSR is not taken into
account anymore in the cpu_has_work() routine. Only the pending
hardware interrupts are checked with their LPCR:PECE* enablement bit.

If the DECR timer fires after 'stop-self' is called and before the CPU
'stop' state is reached, the nearly-dead CPU will have some work to do
and the guest will crash. This case happens very frequently with the
not yet upstream P9 XIVE exploitation mode. In XICS mode, the DECR is
occasionally fired but after 'stop' state, so no work is to be done
and the guest survives.

I suspect there is a race between the QEMU mainloop triggering the
timers and the TCG CPU thread but I could not quite identify the root
cause. To be safe, let's disable in the LPCR all the exceptions which
can cause an exit while the CPU is in power-saving mode and reenable
them when the CPU is started.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-12-15 09:49:24 +11:00
..
translate
arch_dump.c exec,dump,i386,ppc,s390x: don't include exec/cpu-all.h explicitly 2017-09-19 18:21:33 +02:00
compat.c ppc: fix setting of compat mode 2017-11-08 13:21:37 +11:00
cpu-models.c target/ppc: Add POWER9 DD2.0 model information 2017-10-17 10:34:00 +11:00
cpu-models.h target/ppc: Add POWER9 DD2.0 model information 2017-10-17 10:34:00 +11:00
cpu-qom.h pcc: define the Power-saving mode Exit Cause Enable bits in PowerPCCPUClass 2017-12-15 09:49:23 +11:00
cpu.c
cpu.h ppc: spapr: use generic cpu_model parsing 2017-10-17 10:34:01 +11:00
dfp_helper.c
excp_helper.c target/ppc: Fix system lockups caused by interrupt_request state corruption 2017-12-05 12:28:42 +11:00
fpu_helper.c
gdbstub.c
helper_regs.h target/ppc: Fix system lockups caused by interrupt_request state corruption 2017-12-05 12:28:42 +11:00
helper.h
int_helper.c target/ppc: Fix carry flag setting for shift algebraic instructions 2017-10-17 10:34:00 +11:00
internal.h
kvm_ppc.h spapr: fix the value of SDR1 in kvmppc_put_books_sregs() 2017-09-27 13:05:41 +10:00
kvm-stub.c
kvm.c ppc: spapr: use generic cpu_model parsing 2017-10-17 10:34:01 +11:00
machine.c target-ppc: Don't invalidate non-supported msr bits 2017-11-30 14:56:42 +11:00
Makefile.objs build: remove CONFIG_LIBDECNUMBER 2017-10-16 18:03:52 +02:00
mem_helper.c ppc: use DIV_ROUND_UP 2017-08-31 12:29:07 +02:00
mfrom_table_gen.c
mfrom_table.c
misc_helper.c
mmu_helper.c booke206: fix tlbnps for fixed size TLB 2017-09-08 09:30:55 +10:00
mmu-book3s-v3.c
mmu-book3s-v3.h
mmu-hash32.c
mmu-hash32.h
mmu-hash64.c
mmu-hash64.h
mmu-radix64.c
mmu-radix64.h
monitor.c
timebase_helper.c
trace-events
translate_init.c spapr/rtas: disable the decrementer interrupt when a CPU is unplugged 2017-12-15 09:49:24 +11:00
translate.c target/ppc: Use tcg_gen_lookup_and_goto_ptr 2017-12-15 09:49:23 +11:00
user_only_helper.c