aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/ioapic.c
diff options
context:
space:
mode:
Diffstat (limited to 'virt/kvm/ioapic.c')
-rw-r--r--virt/kvm/ioapic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 7c79c1d76d0c..3500dee9cf2b 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -192,12 +192,13 @@ static int ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
192 192
193int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) 193int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
194{ 194{
195 u32 old_irr = ioapic->irr; 195 u32 old_irr;
196 u32 mask = 1 << irq; 196 u32 mask = 1 << irq;
197 union kvm_ioapic_redirect_entry entry; 197 union kvm_ioapic_redirect_entry entry;
198 int ret = 1; 198 int ret = 1;
199 199
200 spin_lock(&ioapic->lock); 200 spin_lock(&ioapic->lock);
201 old_irr = ioapic->irr;
201 if (irq >= 0 && irq < IOAPIC_NUM_PINS) { 202 if (irq >= 0 && irq < IOAPIC_NUM_PINS) {
202 entry = ioapic->redirtbl[irq]; 203 entry = ioapic->redirtbl[irq];
203 level ^= entry.fields.polarity; 204 level ^= entry.fields.polarity;