diff options
author | David Hildenbrand <david@redhat.com> | 2017-09-28 22:36:44 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-10-20 13:32:10 +0200 |
commit | 4beab671464450a8d2bd1d521b64ae6ab841a886 (patch) | |
tree | 89fcdb43c06e2820bb189d62773d261463b91f13 /target | |
parent | 9dec238826361c9d7f60d26b88fd224512355c6e (diff) |
s390x/tcg: STOPPED cpus can never wake up
Interrupts can't wake such CPUs up. SIGP from other CPUs has to be used
to toggle the state.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170928203708.9376-7-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/s390x/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index b0517475fa..a21d5519c1 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; } |