mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
43a0db3537
commit
d96e173769
4 changed files with 12 additions and 12 deletions
3
hw/pc.c
3
hw/pc.c
|
@ -155,9 +155,6 @@ int cpu_get_pic_interrupt(CPUState *env)
|
|||
|
||||
intno = apic_get_interrupt(env->apic_state);
|
||||
if (intno >= 0) {
|
||||
/* set irq request if a PIC irq is still pending */
|
||||
/* XXX: improve that */
|
||||
pic_update_irq(isa_pic);
|
||||
return intno;
|
||||
}
|
||||
/* read the irq from the PIC */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue