Do not spuriously re-enable disabled io_apic pin on EOI for some configurations.

If EOI suppression is supported but reported ioapic version is so old
that it does not has EOI register (weird virtualization setup), fix
Intel trick of eoi-ing by flipping pin type (edge/level) to account
for the disabled pin.

Reported by:	Juniper
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D23965
This commit is contained in:
kib 2020-03-18 21:34:52 +00:00
parent a07c223d6d
commit 566a170262

View File

@ -193,8 +193,11 @@ _ioapic_eoi_source(struct intsrc *isrc, int locked)
low1 |= IOART_TRGREDG | IOART_INTMSET;
ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
low1);
low1 = src->io_lowreg;
if (src->io_masked != 0)
low1 |= IOART_INTMSET;
ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
src->io_lowreg);
low1);
if (!locked)
mtx_unlock_spin(&icu_lock);
}