From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQFL4-0001Z8-AR for qemu-devel@nongnu.org; Tue, 24 Feb 2015 08:15:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQFKv-0002NK-Dh for qemu-devel@nongnu.org; Tue, 24 Feb 2015 08:15:50 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:33775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQFKv-0002Mv-35 for qemu-devel@nongnu.org; Tue, 24 Feb 2015 08:15:41 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Feb 2015 13:15:38 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id D9713219004D for ; Tue, 24 Feb 2015 13:15:29 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1ODFamq7209348 for ; Tue, 24 Feb 2015 13:15:36 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1ODFZnD000617 for ; Tue, 24 Feb 2015 06:15:36 -0700 From: Jens Freimann Date: Tue, 24 Feb 2015 14:15:28 +0100 Message-Id: <1424783731-43426-8-git-send-email-jfrei@linux.vnet.ibm.com> In-Reply-To: <1424783731-43426-1-git-send-email-jfrei@linux.vnet.ibm.com> References: <1424783731-43426-1-git-send-email-jfrei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 07/10] s390x/kvm: SIGP START is only applicable when STOPPED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , Alexander Graf , Cornelia Huck Cc: David Hildenbrand , Jens Freimann , qemu-devel@nongnu.org From: David Hildenbrand In preparation for other CPU states, SIGP START will only start a VCPU if it is in the STOPPED state. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Jens Freimann Signed-off-by: David Hildenbrand --- target-s390x/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index fcb0cae..ed56b3c 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -1117,6 +1117,11 @@ static void sigp_start(void *arg) { SigpInfo *si = arg; + if (s390_cpu_get_state(si->cpu) != CPU_STATE_STOPPED) { + si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; + return; + } + s390_cpu_set_state(CPU_STATE_OPERATING, si->cpu); si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; } -- 2.1.4