diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-30 10:19:24 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-09-25 12:04:42 +0200 |
commit | c5955a561ccdb95ede14e83de0ee8eec00868bd3 (patch) | |
tree | 59b0935221f6544df32da7df8e6f01f32266e117 /hw/intc/ioapic.c | |
parent | f536f1124265026a0ab597773bd9df396fb59565 (diff) |
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.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/intc/ioapic.c')
-rw-r--r-- | hw/intc/ioapic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index b527932382..6ad3c66c1b 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -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; } |