aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2015-02-24 14:15:28 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-03-10 09:26:22 +0100
commit4f2b55d18413ba09f8a4367a670192e46e967fc0 (patch)
treea66a44d910eb9827db7c9f0209dcea116e5c4ec4
parent18ff949474cfbba892fdc34aa6ed7558afc78c5c (diff)
downloadqemu-4f2b55d18413ba09f8a4367a670192e46e967fc0.zip
qemu-4f2b55d18413ba09f8a4367a670192e46e967fc0.tar.gz
qemu-4f2b55d18413ba09f8a4367a670192e46e967fc0.tar.bz2
s390x/kvm: SIGP START is only applicable when STOPPED
In preparation for other CPU states, SIGP START will only start a VCPU if it is in the STOPPED state. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Message-Id: <1424783731-43426-8-git-send-email-jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-rw-r--r--target-s390x/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 127a3b8..7023513 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -1130,6 +1130,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;
}