Message ID | 20170918160012.4317-8-david@redhat.com |
---|---|
State | New |
Headers | show |
Series | s390x: SMP for TCG (+ cleanups) | expand |
On 09/18/2017 08:59 AM, David Hildenbrand wrote: > Interrupts can't wake such CPUs up. SIGP from other CPUs has to be used > to toggle the state. > > Signed-off-by: David Hildenbrand <david@redhat.com> > --- > target/s390x/cpu.c | 6 ++++++ > 1 file changed, 6 insertions(+) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index f42e28ea25..64db086702 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -58,6 +58,12 @@ static bool s390_cpu_has_work(CPUState *cs) S390CPU *cpu = S390_CPU(cs); CPUS390XState *env = &cpu->env; + /* 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; + } + return (cs->interrupt_request & CPU_INTERRUPT_HARD) && (env->psw.mask & PSW_MASK_EXT); }
Interrupts can't wake such CPUs up. SIGP from other CPUs has to be used to toggle the state. Signed-off-by: David Hildenbrand <david@redhat.com> --- target/s390x/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+)