WSL2-Linux-Kernel/virt/kvm
Gleb Natapov b4a2f5e723 KVM: Avoid redelivery of edge interrupt before next edge
The check for an edge is broken in current ioapic code. ioapic->irr is
cleared on each edge interrupt by ioapic_service() and this makes
old_irr != ioapic->irr condition in kvm_ioapic_set_irq() to be always
true. The patch fixes the code to properly recognise edge.

Some HW emulation calls set_irq() without level change. If each such
call is propagated to an OS it may confuse a device driver. This is the
case with keyboard device emulation and Windows XP x64  installer on SMP VM.
Each keystroke produce two interrupts (down/up) one interrupt is
submitted to CPU0 and another to CPU1. This confuses Windows somehow
and it ignores keystrokes.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2009-08-09 11:45:49 +03:00
..
coalesced_mmio.c KVM: Add coalesced MMIO support (common part) 2008-07-20 12:42:31 +03:00
coalesced_mmio.h KVM: Add coalesced MMIO support (common part) 2008-07-20 12:42:31 +03:00
ioapic.c KVM: Avoid redelivery of edge interrupt before next edge 2009-08-09 11:45:49 +03:00
ioapic.h KVM: APIC: get rid of deliver_bitmask 2009-06-10 11:48:27 +03:00
iodev.h
iommu.c KVM: Enable snooping control for supported hardware 2009-06-10 11:48:50 +03:00
irq_comm.c KVM: fix ack not being delivered when msi present 2009-08-05 14:03:43 +03:00
kvm_main.c KVM: protect concurrent make_all_cpus_request 2009-06-28 14:10:29 +03:00
kvm_trace.c KVM: Prevent trace call into unloaded module text 2008-12-31 16:55:04 +02:00