diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/i8259.c | 5 | ||||
-rw-r--r-- | arch/x86/kvm/irq.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 179dcb0103fd..93160375c841 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c | |||
@@ -49,7 +49,8 @@ static void pic_unlock(struct kvm_pic *s) | |||
49 | spin_unlock(&s->lock); | 49 | spin_unlock(&s->lock); |
50 | 50 | ||
51 | while (acks) { | 51 | while (acks) { |
52 | kvm_notify_acked_irq(kvm, __ffs(acks)); | 52 | kvm_notify_acked_irq(kvm, SELECT_PIC(__ffs(acks)), |
53 | __ffs(acks)); | ||
53 | acks &= acks - 1; | 54 | acks &= acks - 1; |
54 | } | 55 | } |
55 | 56 | ||
@@ -232,7 +233,7 @@ int kvm_pic_read_irq(struct kvm *kvm) | |||
232 | } | 233 | } |
233 | pic_update_irq(s); | 234 | pic_update_irq(s); |
234 | pic_unlock(s); | 235 | pic_unlock(s); |
235 | kvm_notify_acked_irq(kvm, irq); | 236 | kvm_notify_acked_irq(kvm, SELECT_PIC(irq), irq); |
236 | 237 | ||
237 | return intno; | 238 | return intno; |
238 | } | 239 | } |
diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h index 82579ee538d0..9f593188129e 100644 --- a/arch/x86/kvm/irq.h +++ b/arch/x86/kvm/irq.h | |||
@@ -32,6 +32,8 @@ | |||
32 | #include "lapic.h" | 32 | #include "lapic.h" |
33 | 33 | ||
34 | #define PIC_NUM_PINS 16 | 34 | #define PIC_NUM_PINS 16 |
35 | #define SELECT_PIC(irq) \ | ||
36 | ((irq) < 8 ? KVM_IRQCHIP_PIC_MASTER : KVM_IRQCHIP_PIC_SLAVE) | ||
35 | 37 | ||
36 | struct kvm; | 38 | struct kvm; |
37 | struct kvm_vcpu; | 39 | struct kvm_vcpu; |