diff options
Diffstat (limited to 'arch/s390/kvm/intercept.c')
-rw-r--r-- | arch/s390/kvm/intercept.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 7a20d63a2eba..9f0d8b239436 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -95,6 +95,7 @@ static int handle_lctl(struct kvm_vcpu *vcpu) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | static intercept_handler_t instruction_handlers[256] = { | 97 | static intercept_handler_t instruction_handlers[256] = { |
98 | [0xae] = kvm_s390_handle_sigp, | ||
98 | [0xb2] = kvm_s390_handle_priv, | 99 | [0xb2] = kvm_s390_handle_priv, |
99 | [0xb7] = handle_lctl, | 100 | [0xb7] = handle_lctl, |
100 | [0xeb] = handle_lctg, | 101 | [0xeb] = handle_lctg, |
@@ -117,10 +118,27 @@ static int handle_noop(struct kvm_vcpu *vcpu) | |||
117 | 118 | ||
118 | static int handle_stop(struct kvm_vcpu *vcpu) | 119 | static int handle_stop(struct kvm_vcpu *vcpu) |
119 | { | 120 | { |
121 | int rc; | ||
122 | |||
120 | vcpu->stat.exit_stop_request++; | 123 | vcpu->stat.exit_stop_request++; |
121 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); | ||
122 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | 124 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); |
123 | return -ENOTSUPP; | 125 | spin_lock_bh(&vcpu->arch.local_int.lock); |
126 | if (vcpu->arch.local_int.action_bits & ACTION_STORE_ON_STOP) { | ||
127 | vcpu->arch.local_int.action_bits &= ~ACTION_STORE_ON_STOP; | ||
128 | rc = __kvm_s390_vcpu_store_status(vcpu, | ||
129 | KVM_S390_STORE_STATUS_NOADDR); | ||
130 | if (rc >= 0) | ||
131 | rc = -ENOTSUPP; | ||
132 | } | ||
133 | |||
134 | if (vcpu->arch.local_int.action_bits & ACTION_STOP_ON_STOP) { | ||
135 | vcpu->arch.local_int.action_bits &= ~ACTION_STOP_ON_STOP; | ||
136 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); | ||
137 | rc = -ENOTSUPP; | ||
138 | } else | ||
139 | rc = 0; | ||
140 | spin_unlock_bh(&vcpu->arch.local_int.lock); | ||
141 | return rc; | ||
124 | } | 142 | } |
125 | 143 | ||
126 | static int handle_validity(struct kvm_vcpu *vcpu) | 144 | static int handle_validity(struct kvm_vcpu *vcpu) |