From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Vt5-0002CC-Rh for qemu-devel@nongnu.org; Fri, 20 Oct 2017 07:54:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5Vt5-0002wz-11 for qemu-devel@nongnu.org; Fri, 20 Oct 2017 07:54:51 -0400 From: Cornelia Huck Date: Fri, 20 Oct 2017 13:53:40 +0200 Message-Id: <20171020115418.2050-9-cohuck@redhat.com> In-Reply-To: <20171020115418.2050-1-cohuck@redhat.com> References: <20171020115418.2050-1-cohuck@redhat.com> Subject: [Qemu-devel] [PULL 08/46] s390x/tcg: STOPPED cpus can never wake up List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: qemu-devel@nongnu.org, qemu-s390x@nongnu.org, rth@twiddle.net, agraf@suse.de, thuth@redhat.com, borntraeger@de.ibm.com, david@redhat.com, Cornelia Huck From: David Hildenbrand Interrupts can't wake such CPUs up. SIGP from other CPUs has to be used to toggle the state. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand Message-Id: <20170928203708.9376-7-david@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.13.6