diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-17 01:09:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 01:09:29 -0500 |
commit | 2bb4646fce8d09916b351d1a62f98db7cec6fc41 (patch) | |
tree | c1f0d002e69868606eca9d1b919835f422892063 /arch/s390/kvm | |
parent | 6836b9bdd98e3b500cd49512484df68f46e14659 (diff) | |
parent | b0483e78e5c4c9871fc5541875b3bc006846d46b (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/intercept.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index ba9d8a7bc1ac..b40096494e46 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -213,7 +213,7 @@ static int handle_instruction_and_prog(struct kvm_vcpu *vcpu) | |||
213 | return rc2; | 213 | return rc2; |
214 | } | 214 | } |
215 | 215 | ||
216 | static const intercept_handler_t intercept_funcs[0x48 >> 2] = { | 216 | static const intercept_handler_t intercept_funcs[] = { |
217 | [0x00 >> 2] = handle_noop, | 217 | [0x00 >> 2] = handle_noop, |
218 | [0x04 >> 2] = handle_instruction, | 218 | [0x04 >> 2] = handle_instruction, |
219 | [0x08 >> 2] = handle_prog, | 219 | [0x08 >> 2] = handle_prog, |
@@ -230,7 +230,7 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu) | |||
230 | intercept_handler_t func; | 230 | intercept_handler_t func; |
231 | u8 code = vcpu->arch.sie_block->icptcode; | 231 | u8 code = vcpu->arch.sie_block->icptcode; |
232 | 232 | ||
233 | if (code & 3 || code > 0x48) | 233 | if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs)) |
234 | return -ENOTSUPP; | 234 | return -ENOTSUPP; |
235 | func = intercept_funcs[code >> 2]; | 235 | func = intercept_funcs[code >> 2]; |
236 | if (func) | 236 | if (func) |