KVM: s390: SIGP START has to report BUSY while stopping a CPU
authorThomas Huth <thuth@linux.vnet.ibm.com>
Tue, 3 Dec 2013 11:54:55 +0000 (12:54 +0100)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Wed, 11 Dec 2013 18:05:21 +0000 (19:05 +0100)
Just like the RESTART order, the START order also has to report BUSY
while a STOP request is pending, to avoid that the START might be
ignored due to a race condition between the STOP and the START order.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
arch/s390/include/asm/sigp.h
arch/s390/kvm/sigp.c

index c002cd529c7158ab1fda9a41fd8d21ef7b630799..d091aa1aaf118e6ab3767c863d2813e84e99c077 100644 (file)
@@ -5,6 +5,7 @@
 #define SIGP_SENSE                   1
 #define SIGP_EXTERNAL_CALL           2
 #define SIGP_EMERGENCY_SIGNAL        3
+#define SIGP_START                   4
 #define SIGP_STOP                    5
 #define SIGP_RESTART                 6
 #define SIGP_STOP_AND_STORE_STATUS    9
index 509547d4fca10f94b768190dc01b1aadf04df342..87c2b3a3bd3ed6f889c987de9610152959296a7b 100644 (file)
@@ -455,6 +455,11 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu)
                rc = __sigp_sense_running(vcpu, cpu_addr,
                                          &vcpu->run->s.regs.gprs[r1]);
                break;
+       case SIGP_START:
+               rc = sigp_check_callable(vcpu, cpu_addr);
+               if (rc == SIGP_CC_ORDER_CODE_ACCEPTED)
+                       rc = -EOPNOTSUPP;    /* Handle START in user space */
+               break;
        case SIGP_RESTART:
                vcpu->stat.instruction_sigp_restart++;
                rc = sigp_check_callable(vcpu, cpu_addr);