]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/timer/hpet: fix IRQ routing in legacy support mode
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 30 Aug 2023 20:13:57 +0000 (21:13 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 1 Feb 2024 16:03:28 +0000 (16:03 +0000)
commit5dd46ce02ca69c65582e62eba9e3bbce8e2a4e22
treed425d1a89d24b90e4769f6ab1e203f8eb03b5314
parent836548787e80b7994faf9b49b107a7bae3f4e2c0
hw/timer/hpet: fix IRQ routing in legacy support mode

The interrupt from timer 0 in legacy mode is supposed to go to IRQ 0 on
the i8259 and IRQ 2 on the I/O APIC. The generic x86 GSI handling can't
cope with IRQ numbers differing between the two chips (despite it also
being the case for PCI INTx routing), so add a special case for the HPET.

IRQ 2 isn't valid on the i8259; it's the cascade IRQ and would be
interpreted as spurious interrupt on the secondary PIC. So we can fix
up all attempts to deliver IRQ2, to actually deliver to IRQ0 on the PIC.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
hw/i386/x86.c
hw/timer/hpet.c