diff options
author | Alexander Graf <agraf@suse.de> | 2010-04-15 18:11:56 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:18:51 -0400 |
commit | ada7ba17b4054f303ad62d91ffd22bc4afad1657 (patch) | |
tree | ec3ae04af0b79b74d850060b165f5898fbe85008 /arch/powerpc/kvm/book3s.c | |
parent | 218d169c4c856eee7df56ea0fb8cbb32167e63d3 (diff) |
KVM: PPC: Check max IRQ prio
We have a define on what the highest bit of IRQ priorities is. So we can
just as well use it in the bit checking code and avoid invalid IRQ values
to be triggered.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 61ae0faf0d24..ec0a6512ab09 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -337,7 +337,7 @@ void kvmppc_core_deliver_interrupts(struct kvm_vcpu *vcpu) | |||
337 | printk(KERN_EMERG "KVM: Check pending: %lx\n", vcpu->arch.pending_exceptions); | 337 | printk(KERN_EMERG "KVM: Check pending: %lx\n", vcpu->arch.pending_exceptions); |
338 | #endif | 338 | #endif |
339 | priority = __ffs(*pending); | 339 | priority = __ffs(*pending); |
340 | while (priority <= (sizeof(unsigned int) * 8)) { | 340 | while (priority < BOOK3S_IRQPRIO_MAX) { |
341 | if (kvmppc_book3s_irqprio_deliver(vcpu, priority) && | 341 | if (kvmppc_book3s_irqprio_deliver(vcpu, priority) && |
342 | (priority != BOOK3S_IRQPRIO_DECREMENTER)) { | 342 | (priority != BOOK3S_IRQPRIO_DECREMENTER)) { |
343 | /* DEC interrupts get cleared by mtdec */ | 343 | /* DEC interrupts get cleared by mtdec */ |