xemu/hw
Paolo Bonzini 5224c88dd3 apic: fix incorrect handling of ExtINT interrupts wrt processor priority
This fixes another failure with ExtINT, demonstrated by QNX.  The failure
mode is as follows:
- IPI sent to cpu 0 (bit set in APIC irr)
- IPI accepted by cpu 0 (bit cleared in irr, set in isr)
- IPI sent to cpu 0 (bit set in both irr and isr)
- PIC interrupt sent to cpu 0

The PIC interrupt causes CPU_INTERRUPT_HARD to be set, but
apic_irq_pending observes that the highest pending APIC interrupt priority
(the IPI) is the same as the processor priority (since the IPI is still
being handled), so apic_get_interrupt returns a spurious interrupt rather
than the pending PIC interrupt. The result is an endless sequence of
spurious interrupts, since nothing will clear CPU_INTERRUPT_HARD.

Instead, ExtINT interrupts should have ignored the processor priority.
Calling apic_check_pic early in apic_get_interrupt ensures that
apic_deliver_pic_intr is called instead of delivering the spurious
interrupt.  apic_deliver_pic_intr then clears CPU_INTERRUPT_HARD if needed.

Reported-by: Richard Bilson <rbilson@qnx.com>
Tested-by: Richard Bilson <rbilson@qnx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-11-24 14:37:45 +01:00
..
9pfs
acpi
alpha
arm
audio
block
bt
char
core
cpu
cris
display
dma
gpio
i2c
i386
ide
input
intc apic: fix incorrect handling of ExtINT interrupts wrt processor priority 2014-11-24 14:37:45 +01:00
ipack
isa
lm32
m68k
mem
microblaze
mips
misc
moxie
net rtl8139: fix Pointer to local outside scope 2014-11-21 10:50:54 +00:00
nvram
openrisc
pci
pci-bridge
pci-host
pcmcia
ppc
s390x
scsi
sd
sh4
sparc
sparc64
ssi
timer
tpm
tricore
unicore32
usb
virtio
watchdog
xen
xenpv
xtensa
Makefile.objs