diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/kvm/kvm.h | 3 | ||||
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 25439a5968..cec5f057f3 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -324,8 +324,7 @@ struct kvm_vcpu { | |||
324 | int guest_mode; | 324 | int guest_mode; |
325 | unsigned long requests; | 325 | unsigned long requests; |
326 | unsigned long irq_summary; /* bit vector: 1 per word in irq_pending */ | 326 | unsigned long irq_summary; /* bit vector: 1 per word in irq_pending */ |
327 | #define NR_IRQ_WORDS KVM_IRQ_BITMAP_SIZE(unsigned long) | 327 | DECLARE_BITMAP(irq_pending, KVM_NR_INTERRUPTS); |
328 | unsigned long irq_pending[NR_IRQ_WORDS]; | ||
329 | unsigned long regs[NR_VCPU_REGS]; /* for rsp: vcpu_load_rsp_rip() */ | 328 | unsigned long regs[NR_VCPU_REGS]; /* for rsp: vcpu_load_rsp_rip() */ |
330 | unsigned long rip; /* needs vcpu_load_rsp_rip() */ | 329 | unsigned long rip; /* needs vcpu_load_rsp_rip() */ |
331 | 330 | ||
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index af02320012..fc63de25d9 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -2130,7 +2130,7 @@ static int kvm_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
2130 | memcpy(vcpu->irq_pending, sregs->interrupt_bitmap, | 2130 | memcpy(vcpu->irq_pending, sregs->interrupt_bitmap, |
2131 | sizeof vcpu->irq_pending); | 2131 | sizeof vcpu->irq_pending); |
2132 | vcpu->irq_summary = 0; | 2132 | vcpu->irq_summary = 0; |
2133 | for (i = 0; i < NR_IRQ_WORDS; ++i) | 2133 | for (i = 0; i < ARRAY_SIZE(vcpu->irq_pending); ++i) |
2134 | if (vcpu->irq_pending[i]) | 2134 | if (vcpu->irq_pending[i]) |
2135 | __set_bit(i, &vcpu->irq_summary); | 2135 | __set_bit(i, &vcpu->irq_summary); |
2136 | 2136 | ||