aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/helper.c')
-rw-r--r--target/s390x/helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index 3c57c32..5c127da 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -91,7 +91,9 @@ void s390_handle_wait(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
- if (s390_cpu_halt(cpu) == 0) {
+ s390_cpu_halt(cpu);
+
+ if (s390_count_running_cpus() == 0) {
if (is_special_wait_psw(cpu->env.psw.addr)) {
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
} else {