aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/cpu.c')
-rw-r--r--target/s390x/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index b051747..a21d551 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -57,6 +57,12 @@ static bool s390_cpu_has_work(CPUState *cs)
{
S390CPU *cpu = S390_CPU(cs);
+ /* STOPPED cpus can never wake up */
+ if (s390_cpu_get_state(cpu) != CPU_STATE_LOAD &&
+ s390_cpu_get_state(cpu) != CPU_STATE_OPERATING) {
+ return false;
+ }
+
if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) {
return false;
}