From 4f2b55d18413ba09f8a4367a670192e46e967fc0 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Tue, 24 Feb 2015 14:15:28 +0100 Subject: 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 Reviewed-by: Cornelia Huck Signed-off-by: Jens Freimann Signed-off-by: David Hildenbrand Message-Id: <1424783731-43426-8-git-send-email-jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'target-s390x') 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; } -- cgit v1.1