diff options
-rw-r--r-- | arch/s390/kvm/intercept.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 776ef83c2771..361456577c6f 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -133,13 +133,6 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
133 | 133 | ||
134 | vcpu->stat.exit_stop_request++; | 134 | vcpu->stat.exit_stop_request++; |
135 | spin_lock_bh(&vcpu->arch.local_int.lock); | 135 | spin_lock_bh(&vcpu->arch.local_int.lock); |
136 | if (vcpu->arch.local_int.action_bits & ACTION_STORE_ON_STOP) { | ||
137 | vcpu->arch.local_int.action_bits &= ~ACTION_STORE_ON_STOP; | ||
138 | rc = kvm_s390_vcpu_store_status(vcpu, | ||
139 | KVM_S390_STORE_STATUS_NOADDR); | ||
140 | if (rc >= 0) | ||
141 | rc = -EOPNOTSUPP; | ||
142 | } | ||
143 | 136 | ||
144 | if (vcpu->arch.local_int.action_bits & ACTION_RELOADVCPU_ON_STOP) { | 137 | if (vcpu->arch.local_int.action_bits & ACTION_RELOADVCPU_ON_STOP) { |
145 | vcpu->arch.local_int.action_bits &= ~ACTION_RELOADVCPU_ON_STOP; | 138 | vcpu->arch.local_int.action_bits &= ~ACTION_RELOADVCPU_ON_STOP; |
@@ -155,7 +148,18 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
155 | rc = -EOPNOTSUPP; | 148 | rc = -EOPNOTSUPP; |
156 | } | 149 | } |
157 | 150 | ||
158 | spin_unlock_bh(&vcpu->arch.local_int.lock); | 151 | if (vcpu->arch.local_int.action_bits & ACTION_STORE_ON_STOP) { |
152 | vcpu->arch.local_int.action_bits &= ~ACTION_STORE_ON_STOP; | ||
153 | /* store status must be called unlocked. Since local_int.lock | ||
154 | * only protects local_int.* and not guest memory we can give | ||
155 | * up the lock here */ | ||
156 | spin_unlock_bh(&vcpu->arch.local_int.lock); | ||
157 | rc = kvm_s390_vcpu_store_status(vcpu, | ||
158 | KVM_S390_STORE_STATUS_NOADDR); | ||
159 | if (rc >= 0) | ||
160 | rc = -EOPNOTSUPP; | ||
161 | } else | ||
162 | spin_unlock_bh(&vcpu->arch.local_int.lock); | ||
159 | return rc; | 163 | return rc; |
160 | } | 164 | } |
161 | 165 | ||