• Gleb Natapov's avatar
    KVM: Avoid redelivery of edge interrupt before next edge · b4a2f5e7
    Gleb Natapov authored
    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: default avatarGleb Natapov <gleb@redhat.com>
    Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
    b4a2f5e7
Name
Last commit
Last update
..
coalesced_mmio.c Loading commit data...
coalesced_mmio.h Loading commit data...
ioapic.c Loading commit data...
ioapic.h Loading commit data...
iodev.h Loading commit data...
iommu.c Loading commit data...
irq_comm.c Loading commit data...
kvm_main.c Loading commit data...
kvm_trace.c Loading commit data...