Skip to contentSkip to conversation

ioapic: coalesce level interrupts

PATCH New Paolo Bonzini 1 participant 1 message Jul 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ioapic: coalesce level interrupts

If a level-triggered interrupt goes down and back up before the corresponding EOI, it should be coalesced. This fixes one testcase in kvm-unit-tests' ioapic.flat.

---
 hw/intc/ioapic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
hw/intc/ioapic.c +3 -1
index b527932..6ad3c66 100644
@@ -98,7 +98,9 @@ static void ioapic_set_irq(void *opaque, int vector, int level)
             /* level triggered */
             if (level) {
                 s->irr |= mask;
-                ioapic_service(s);
+                if (!(entry & IOAPIC_LVT_REMOTE_IRR)) {
+                    ioapic_service(s);
+                }
             } else {
                 s->irr &= ~mask;
             }
Signature · 1 line
2.4.3