KVM: x86: ioapic: Don't fire level irq when Remote IRR set
authorNikita Leshenko <nikita.leshchenko@oracle.com>
Sun, 5 Nov 2017 13:52:30 +0000 (15:52 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 17 Nov 2017 12:20:18 +0000 (13:20 +0100)
commitda3fe7bdfada217bf02ecd0477fcdb55da50944c
tree83c19f01d52b4f080dd051de89ad264692bf9733
parent0fc5a36dd6b345eb0d251a65c236e53bead3eef7
KVM: x86: ioapic: Don't fire level irq when Remote IRR set

Avoid firing a level-triggered interrupt that has the Remote IRR bit set,
because that means that some CPU is already processing it. The Remote
IRR bit will be cleared after an EOI and the interrupt will refire
if the irq line is still asserted.

This behavior is aligned with QEMU's IOAPIC implementation that was
introduced by commit f99b86b94987
("x86: ioapic: ignore level irq during processing") in QEMU.

Signed-off-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/ioapic.c