diff options
author | David Hildenbrand <david@redhat.com> | 2017-09-28 22:36:46 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-10-20 13:32:10 +0200 |
commit | 83f7f32901c630f4fc01acd0d9082da466b17102 (patch) | |
tree | 2c571253c7a9908b5cb6a2f8ef27f5cab93ba4a3 /target/s390x/kvm.c | |
parent | 2b3394f13d2b38f0342ead78d5e60d42c29f1d4c (diff) | |
download | qemu-83f7f32901c630f4fc01acd0d9082da466b17102.zip |
target/s390x: factor out handling of WAIT PSW into s390_handle_wait()
This will now also detect crashes under TCG. We can directly use
cpu->env.psw.addr instead of kvm_run, as we do a cpu_synchronize_state().
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170928203708.9376-9-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/kvm.c')
-rw-r--r-- | target/s390x/kvm.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index d3700fc2c2..3f656cfd07 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -1997,12 +1997,6 @@ static int handle_instruction(S390CPU *cpu, struct kvm_run *run) return r; } -static bool is_special_wait_psw(CPUState *cs) -{ - /* signal quiesce */ - return cs->kvm_run->psw_addr == 0xfffUL; -} - static void unmanageable_intercept(S390CPU *cpu, const char *str, int pswoffset) { CPUState *cs = CPU(cpu); @@ -2074,13 +2068,7 @@ static int handle_intercept(S390CPU *cpu) case ICPT_WAITPSW: /* disabled wait, since enabled wait is handled in kernel */ cpu_synchronize_state(cs); - if (s390_cpu_halt(cpu) == 0) { - if (is_special_wait_psw(cs)) { - qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); - } else { - qemu_system_guest_panicked(NULL); - } - } + s390_handle_wait(cpu); r = EXCP_HALTED; break; case ICPT_CPU_STOP: |