Commit 58bc33b2 authored by Thomas Huth's avatar Thomas Huth Committed by Cornelia Huck

KVM: s390: SIGP START has to report BUSY while stopping a CPU

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: default avatarThomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
parent cc92d6de
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#define SIGP_SENSE 1 #define SIGP_SENSE 1
#define SIGP_EXTERNAL_CALL 2 #define SIGP_EXTERNAL_CALL 2
#define SIGP_EMERGENCY_SIGNAL 3 #define SIGP_EMERGENCY_SIGNAL 3
#define SIGP_START 4
#define SIGP_STOP 5 #define SIGP_STOP 5
#define SIGP_RESTART 6 #define SIGP_RESTART 6
#define SIGP_STOP_AND_STORE_STATUS 9 #define SIGP_STOP_AND_STORE_STATUS 9
......
...@@ -455,6 +455,11 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu) ...@@ -455,6 +455,11 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu)
rc = __sigp_sense_running(vcpu, cpu_addr, rc = __sigp_sense_running(vcpu, cpu_addr,
&vcpu->run->s.regs.gprs[r1]); &vcpu->run->s.regs.gprs[r1]);
break; 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: case SIGP_RESTART:
vcpu->stat.instruction_sigp_restart++; vcpu->stat.instruction_sigp_restart++;
rc = sigp_check_callable(vcpu, cpu_addr); rc = sigp_check_callable(vcpu, cpu_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment