Vitaly Kuznetsov 958a01dab8 ioapic: allow buggy guests mishandling level-triggered interrupts to make progress
It was found that Hyper-V 2016 on KVM in some configurations (q35 machine +
piix4-usb-uhci) hangs on boot. Root-cause was that one of Hyper-V
level-triggered interrupt handler performs EOI before fixing the cause of
the interrupt. This results in IOAPIC keep re-raising the level-triggered
interrupt after EOI because irq-line remains asserted.

Gory details: https://www.spinics.net/lists/kvm/msg184484.html
(the whole thread).

Turns out we were dealing with similar issues before; in-kernel IOAPIC
implementation has commit 184564efae4d ("kvm: ioapic: conditionally delay
irq delivery duringeoi broadcast") which describes a very similar issue.

Steal the idea from the above mentioned commit for IOAPIC implementation in
QEMU. SUCCESSIVE_IRQ_MAX_COUNT, delay and the comment are borrowed as well.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20190402080215.10747-1-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17 15:19:39 +02:00
..
2019-03-07 21:45:53 +01:00
2019-05-13 16:52:56 +01:00
2019-04-01 08:53:40 +02:00
2019-03-07 21:45:53 +01:00
2019-03-07 21:45:53 +01:00
2019-03-25 17:01:10 +00:00
2019-05-13 16:52:56 +01:00
2019-03-07 21:45:53 +01:00
2019-05-17 15:19:38 +02:00
2019-04-29 16:09:51 +01:00
2019-03-07 21:45:53 +01:00
2019-04-27 21:34:46 +01:00
2019-04-04 16:36:21 -07:00
2019-04-26 14:30:18 +01:00
2019-05-15 11:56:53 +02:00
2019-03-07 21:45:53 +01:00
2019-05-17 15:19:38 +02:00
2019-03-08 16:31:34 +00:00
2019-04-27 21:34:46 +01:00