• Marcelo Tosatti's avatar
    KVM: fix i8259 reset irq acking · 85428ac7
    Marcelo Tosatti authored
    The irq ack during pic reset has three problems:
    
    - Ignores slave/master PIC, using gsi 0-8 for both.
    - Generates an ACK even if the APIC is in control.
    - Depends upon IMR being clear, which is broken if the irq was masked
    at the time it was generated.
    
    The last one causes the BIOS to hang after the first reboot of
    Windows installation, since PIT interrupts stop.
    
    [avi: fix check whether pic interrupts are seen by cpu]
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    85428ac7
i8259.c 10.2 KB