diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-02-26 16:37:41 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:31 -0500 |
commit | b8e660b83d505148c83ddc6d5ba69c29d0eab1e3 (patch) | |
tree | cd4a679a8bf867bd7b0644292524c5fed64c6d0b /arch/s390/kvm | |
parent | 59b697874529f5c3cbcaf5816b3d6c584af521e8 (diff) |
[S390] Replace ENOTSUPP usage with EOPNOTSUPP
ENOTSUPP is not supposed to leak to userspace so lets just use
EOPNOTSUPP everywhere.
Doesn't fix a bug, but makes future reviews easier.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/diag.c | 4 | ||||
-rw-r--r-- | arch/s390/kvm/intercept.c | 18 | ||||
-rw-r--r-- | arch/s390/kvm/interrupt.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/priv.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/sigp.c | 4 |
6 files changed, 16 insertions, 16 deletions
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index 8300309698fa..9e4c84187cf5 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c | |||
@@ -39,7 +39,7 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu) | |||
39 | vcpu->run->s390_reset_flags = 0; | 39 | vcpu->run->s390_reset_flags = 0; |
40 | break; | 40 | break; |
41 | default: | 41 | default: |
42 | return -ENOTSUPP; | 42 | return -EOPNOTSUPP; |
43 | } | 43 | } |
44 | 44 | ||
45 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); | 45 | atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); |
@@ -62,6 +62,6 @@ int kvm_s390_handle_diag(struct kvm_vcpu *vcpu) | |||
62 | case 0x308: | 62 | case 0x308: |
63 | return __diag_ipl_functions(vcpu); | 63 | return __diag_ipl_functions(vcpu); |
64 | default: | 64 | default: |
65 | return -ENOTSUPP; | 65 | return -EOPNOTSUPP; |
66 | } | 66 | } |
67 | } | 67 | } |
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index b40096494e46..3ddc30895e31 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -32,7 +32,7 @@ static int handle_lctlg(struct kvm_vcpu *vcpu) | |||
32 | 32 | ||
33 | vcpu->stat.instruction_lctlg++; | 33 | vcpu->stat.instruction_lctlg++; |
34 | if ((vcpu->arch.sie_block->ipb & 0xff) != 0x2f) | 34 | if ((vcpu->arch.sie_block->ipb & 0xff) != 0x2f) |
35 | return -ENOTSUPP; | 35 | return -EOPNOTSUPP; |
36 | 36 | ||
37 | useraddr = disp2; | 37 | useraddr = disp2; |
38 | if (base2) | 38 | if (base2) |
@@ -138,7 +138,7 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
138 | rc = __kvm_s390_vcpu_store_status(vcpu, | 138 | rc = __kvm_s390_vcpu_store_status(vcpu, |
139 | KVM_S390_STORE_STATUS_NOADDR); | 139 | KVM_S390_STORE_STATUS_NOADDR); |
140 | if (rc >= 0) | 140 | if (rc >= 0) |
141 | rc = -ENOTSUPP; | 141 | rc = -EOPNOTSUPP; |
142 | } | 142 | } |
143 | 143 | ||
144 | if (vcpu->arch.local_int.action_bits & ACTION_RELOADVCPU_ON_STOP) { | 144 | if (vcpu->arch.local_int.action_bits & ACTION_RELOADVCPU_ON_STOP) { |
@@ -150,7 +150,7 @@ static int handle_stop(struct kvm_vcpu *vcpu) | |||
150 | if (vcpu->arch.local_int.action_bits & ACTION_STOP_ON_STOP) { | 150 | if (vcpu->arch.local_int.action_bits & ACTION_STOP_ON_STOP) { |
151 | vcpu->arch.local_int.action_bits &= ~ACTION_STOP_ON_STOP; | 151 | vcpu->arch.local_int.action_bits &= ~ACTION_STOP_ON_STOP; |
152 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); | 152 | VCPU_EVENT(vcpu, 3, "%s", "cpu stopped"); |
153 | rc = -ENOTSUPP; | 153 | rc = -EOPNOTSUPP; |
154 | } | 154 | } |
155 | 155 | ||
156 | spin_unlock_bh(&vcpu->arch.local_int.lock); | 156 | spin_unlock_bh(&vcpu->arch.local_int.lock); |
@@ -171,9 +171,9 @@ static int handle_validity(struct kvm_vcpu *vcpu) | |||
171 | 2*PAGE_SIZE); | 171 | 2*PAGE_SIZE); |
172 | if (rc) | 172 | if (rc) |
173 | /* user will receive sigsegv, exit to user */ | 173 | /* user will receive sigsegv, exit to user */ |
174 | rc = -ENOTSUPP; | 174 | rc = -EOPNOTSUPP; |
175 | } else | 175 | } else |
176 | rc = -ENOTSUPP; | 176 | rc = -EOPNOTSUPP; |
177 | 177 | ||
178 | if (rc) | 178 | if (rc) |
179 | VCPU_EVENT(vcpu, 2, "unhandled validity intercept code %d", | 179 | VCPU_EVENT(vcpu, 2, "unhandled validity intercept code %d", |
@@ -189,7 +189,7 @@ static int handle_instruction(struct kvm_vcpu *vcpu) | |||
189 | handler = instruction_handlers[vcpu->arch.sie_block->ipa >> 8]; | 189 | handler = instruction_handlers[vcpu->arch.sie_block->ipa >> 8]; |
190 | if (handler) | 190 | if (handler) |
191 | return handler(vcpu); | 191 | return handler(vcpu); |
192 | return -ENOTSUPP; | 192 | return -EOPNOTSUPP; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int handle_prog(struct kvm_vcpu *vcpu) | 195 | static int handle_prog(struct kvm_vcpu *vcpu) |
@@ -206,7 +206,7 @@ static int handle_instruction_and_prog(struct kvm_vcpu *vcpu) | |||
206 | rc = handle_instruction(vcpu); | 206 | rc = handle_instruction(vcpu); |
207 | rc2 = handle_prog(vcpu); | 207 | rc2 = handle_prog(vcpu); |
208 | 208 | ||
209 | if (rc == -ENOTSUPP) | 209 | if (rc == -EOPNOTSUPP) |
210 | vcpu->arch.sie_block->icptcode = 0x04; | 210 | vcpu->arch.sie_block->icptcode = 0x04; |
211 | if (rc) | 211 | if (rc) |
212 | return rc; | 212 | return rc; |
@@ -231,9 +231,9 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu) | |||
231 | u8 code = vcpu->arch.sie_block->icptcode; | 231 | u8 code = vcpu->arch.sie_block->icptcode; |
232 | 232 | ||
233 | if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs)) | 233 | if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs)) |
234 | return -ENOTSUPP; | 234 | return -EOPNOTSUPP; |
235 | func = intercept_funcs[code >> 2]; | 235 | func = intercept_funcs[code >> 2]; |
236 | if (func) | 236 | if (func) |
237 | return func(vcpu); | 237 | return func(vcpu); |
238 | return -ENOTSUPP; | 238 | return -EOPNOTSUPP; |
239 | } | 239 | } |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 43486c2408e1..da20c3df3ec1 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -342,7 +342,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
342 | if (psw_interrupts_disabled(vcpu)) { | 342 | if (psw_interrupts_disabled(vcpu)) { |
343 | VCPU_EVENT(vcpu, 3, "%s", "disabled wait"); | 343 | VCPU_EVENT(vcpu, 3, "%s", "disabled wait"); |
344 | __unset_cpu_idle(vcpu); | 344 | __unset_cpu_idle(vcpu); |
345 | return -ENOTSUPP; /* disabled wait */ | 345 | return -EOPNOTSUPP; /* disabled wait */ |
346 | } | 346 | } |
347 | 347 | ||
348 | if (psw_extint_disabled(vcpu) || | 348 | if (psw_extint_disabled(vcpu) || |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 70e799eefec9..7f19340481b7 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -543,7 +543,7 @@ rerun_vcpu: | |||
543 | rc = -EINTR; | 543 | rc = -EINTR; |
544 | } | 544 | } |
545 | 545 | ||
546 | if (rc == -ENOTSUPP) { | 546 | if (rc == -EOPNOTSUPP) { |
547 | /* intercept cannot be handled in-kernel, prepare kvm-run */ | 547 | /* intercept cannot be handled in-kernel, prepare kvm-run */ |
548 | kvm_run->exit_reason = KVM_EXIT_S390_SIEIC; | 548 | kvm_run->exit_reason = KVM_EXIT_S390_SIEIC; |
549 | kvm_run->s390_sieic.icptcode = vcpu->arch.sie_block->icptcode; | 549 | kvm_run->s390_sieic.icptcode = vcpu->arch.sie_block->icptcode; |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index d426aac8095d..28c55677eb39 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -323,5 +323,5 @@ int kvm_s390_handle_b2(struct kvm_vcpu *vcpu) | |||
323 | else | 323 | else |
324 | return handler(vcpu); | 324 | return handler(vcpu); |
325 | } | 325 | } |
326 | return -ENOTSUPP; | 326 | return -EOPNOTSUPP; |
327 | } | 327 | } |
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index 15ee1111de58..241a48459b66 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c | |||
@@ -172,7 +172,7 @@ static int __sigp_set_arch(struct kvm_vcpu *vcpu, u32 parameter) | |||
172 | rc = 0; /* order accepted */ | 172 | rc = 0; /* order accepted */ |
173 | break; | 173 | break; |
174 | default: | 174 | default: |
175 | rc = -ENOTSUPP; | 175 | rc = -EOPNOTSUPP; |
176 | } | 176 | } |
177 | return rc; | 177 | return rc; |
178 | } | 178 | } |
@@ -293,7 +293,7 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu) | |||
293 | vcpu->stat.instruction_sigp_restart++; | 293 | vcpu->stat.instruction_sigp_restart++; |
294 | /* user space must know about restart */ | 294 | /* user space must know about restart */ |
295 | default: | 295 | default: |
296 | return -ENOTSUPP; | 296 | return -EOPNOTSUPP; |
297 | } | 297 | } |
298 | 298 | ||
299 | if (rc < 0) | 299 | if (rc < 0) |