]> 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>
Wed, 25 Oct 2023 11:45:21 +0000 (12:45 +0100)
commit14d9d69328fa4bdff1b0232e5785ff3db6fb52ad
tree43e5562c8f8f90aecbc6e92927c8247f1e0500d7
parenta95260486aa7e78d7c7194eba65cf03311ad94ad
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