qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 08/20] s390x/kvm: SIGP START is only applicable when


From: Christian Borntraeger
Subject: [Qemu-devel] [PULL 08/20] s390x/kvm: SIGP START is only applicable when STOPPED
Date: Tue, 10 Mar 2015 09:38:01 +0100

From: David Hildenbrand <address@hidden>

In preparation for other CPU states, SIGP START will only start a VCPU if it is
in the STOPPED state.

Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Jens Freimann <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
---
 target-s390x/kvm.c | 5 +++++
 1 file changed, 5 insertions(+)

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;
 }
-- 
2.3.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]