summaryrefslogtreecommitdiffstats
path: root/hw/pc.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-10-07 09:19:37 +0200
committerBlue Swirl <blauwirbel@gmail.com>2011-10-16 11:10:52 +0000
commitd96e1737696974efb4566741e75a1f99920f262b (patch)
treeb7d42841341af99bc42c6e82d664f712574f2f7d /hw/pc.h
parent43a0db3537583b269083c8ec20dbe3388510ae54 (diff)
downloadhqemu-d96e1737696974efb4566741e75a1f99920f262b.zip
hqemu-d96e1737696974efb4566741e75a1f99920f262b.tar.gz
pc: Fix and clean up PIC-to-APIC IRQ path
The master PIC is connected to the LINTIN0 of the APICs. As the APIC currently does not track the state of that line, we have to ask the PIC to reinject its IRQ after the CPU picked up an event from the APIC. This introduces pic_get_output to read the master PIC IRQ line state without changing it. The APIC uses this function to decide if a PIC IRQ should be reinjected on apic_update_irq. This reflects better how the real hardware works. The patch fixes some failures of the kvm unit tests apic and eventinj by allowing to enable the proper CPU IRQ deassertion when the guest masks some pending IRQs at PIC level. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pc.h')
-rw-r--r--hw/pc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pc.h b/hw/pc.h
index 72f8c7c..d133dc0 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -66,7 +66,7 @@ void pic_set_irq(int irq, int level);
void pic_set_irq_new(void *opaque, int irq, int level);
qemu_irq *i8259_init(qemu_irq parent_irq);
int pic_read_irq(PicState2 *s);
-void pic_update_irq(PicState2 *s);
+int pic_get_output(PicState2 *s);
uint32_t pic_intack_read(PicState2 *s);
void pic_info(Monitor *mon);
void irq_info(Monitor *mon);
OpenPOWER on IntegriCloud