qemu-e2k/target/s390x
Christian Borntraeger 409422cd83 s390x/kvm: detect some program check loops
Sometimes (e.g. early boot) a guest is broken in such ways that it loops
100% delivering operation exceptions (illegal operation) but the pgm new
PSW is not set properly. This will result in code being read from
address zero, which usually contains another illegal op. Let's detect
this case and put the guest in crashed state. Instead of only detecting
this for address zero apply a heuristic that will work for any program
check new psw so that it will also reach the crashed state if you
provide some random elf file to the -kernel option.
We do not want guest problem state to be able to trigger a guest panic,
e.g. by faulting on an address that is the same as the program check
new PSW, so we check for the problem state bit being off.

With this we
a: get rid of CPU consumption of such broken guests
b: keep the program old PSW. This allows to find out the original illegal
   operation - making debugging such early boot issues much easier than
   with single stepping

This relies on the kernel using a similar heuristic and passing such
operation exceptions to user space.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-02-24 10:15:18 +01:00
..
arch_dump.c
cc_helper.c
cpu_features_def.h
cpu_features.c
cpu_features.h
cpu_models.c qmp: Report QOM type name on query-cpu-definitions 2017-01-12 15:51:36 -02:00
cpu_models.h
cpu-qom.h
cpu.c qom/cpu: move tlb_flush to cpu_common_reset 2017-01-13 14:24:31 +00:00
cpu.h qom/cpu: move tlb_flush to cpu_common_reset 2017-01-13 14:24:31 +00:00
fpu_helper.c
gdbstub.c * QOM interface fix (Eduardo) 2017-01-20 16:42:07 +00:00
gen-features.c
helper.c
helper.h target-s390x: Use clz opcode 2017-01-10 08:06:11 -08:00
insn-data.def
insn-format.def
int_helper.c target-s390x: Avoid a loop for popcnt 2017-01-10 08:48:57 -08:00
interrupt.c
ioinst.c
kvm.c s390x/kvm: detect some program check loops 2017-02-24 10:15:18 +01:00
machine.c migration: consolidate VMStateField.start 2017-02-13 17:27:13 +00:00
Makefile.objs
mem_helper.c cputlb: drop flush_global flag from tlb_flush 2017-01-13 14:24:37 +00:00
misc_helper.c
mmu_helper.c
trace-events
translate.c target-s390x: Use clz opcode 2017-01-10 08:06:11 -08:00