]> git.ipfire.org Git - thirdparty/qemu.git/commit
apic: Resolve potential endless loop around apic_update_irq
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 9 Jul 2012 14:42:30 +0000 (16:42 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 21 Aug 2012 20:36:35 +0000 (15:36 -0500)
commitc337db8cc9f4725c0654134de42b97f7847186a4
treef58dfa18aae842022426342058e3da245ebf8e27
parent44a42fd2b69b1bc9cdb54d0cbfcdfd6b3bbf0c31
apic: Resolve potential endless loop around apic_update_irq

Commit d96e173769 refactored the reinjection of pending PIC interrupts.
However, it missed the potential loop of apic_update_irq ->
apic_deliver_pic_intr -> apic_local_deliver -> apic_set_irq ->
apic_update_irq that /could/ occur if LINT0 is injected as APIC_DM_FIXED
and that vector is currently blocked via TPR.

Resolve this by reinjecting only where it matters: inside
apic_get_interrupt. This function may clear a vector while a
PIC-originated reason still exists.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
(cherry picked from commit 3db3659bf60094657e1465cc809acb09551816ee)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/apic.c