mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ioapic: Implement EOI handling for level-triggered IRQs
Add the missing EOI broadcast from local APIC to the IOAPICs on completion of level-triggered IRQs. This ensures that a still asserted IRQ source properly re-triggers an APIC IRQ. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
73eb4c04e9
commit
0280b571c1
3 changed files with 67 additions and 5 deletions
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
#include "hw.h"
|
||||
#include "apic.h"
|
||||
#include "ioapic.h"
|
||||
#include "qemu-timer.h"
|
||||
#include "host-utils.h"
|
||||
#include "sysbus.h"
|
||||
|
@ -57,7 +58,8 @@
|
|||
|
||||
#define ESR_ILLEGAL_ADDRESS (1 << 7)
|
||||
|
||||
#define APIC_SV_ENABLE (1 << 8)
|
||||
#define APIC_SV_DIRECTED_IO (1<<12)
|
||||
#define APIC_SV_ENABLE (1<<8)
|
||||
|
||||
#define MAX_APICS 255
|
||||
#define MAX_APIC_WORDS 8
|
||||
|
@ -420,8 +422,9 @@ static void apic_eoi(APICState *s)
|
|||
if (isrv < 0)
|
||||
return;
|
||||
reset_bit(s->isr, isrv);
|
||||
/* XXX: send the EOI packet to the APIC bus to allow the I/O APIC to
|
||||
set the remote IRR bit for level triggered interrupts. */
|
||||
if (!(s->spurious_vec & APIC_SV_DIRECTED_IO) && get_bit(s->tmr, isrv)) {
|
||||
ioapic_eoi_broadcast(isrv);
|
||||
}
|
||||
apic_update_irq(s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue