Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179960
b: refs/heads/master
c: 062d5e9
h: refs/heads/master
v: v3
  • Loading branch information
Christian Borntraeger authored and Marcelo Tosatti committed Jan 25, 2010
1 parent 82032cb commit d3772c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6a114d27273c37cd0107b0f49af208168498f05
refs/heads/master: 062d5e9b0d714f449b261bb522eadaaf6f00f438
4 changes: 2 additions & 2 deletions trunk/arch/s390/kvm/intercept.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static int handle_instruction_and_prog(struct kvm_vcpu *vcpu)
return rc2;
}

static const intercept_handler_t intercept_funcs[0x48 >> 2] = {
static const intercept_handler_t intercept_funcs[] = {
[0x00 >> 2] = handle_noop,
[0x04 >> 2] = handle_instruction,
[0x08 >> 2] = handle_prog,
Expand All @@ -230,7 +230,7 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)
intercept_handler_t func;
u8 code = vcpu->arch.sie_block->icptcode;

if (code & 3 || code > 0x48)
if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs))
return -ENOTSUPP;
func = intercept_funcs[code >> 2];
if (func)
Expand Down

0 comments on commit d3772c5

Please sign in to comment.