HomeFreeBSD

bhyve/ioapic: improve the tracking of IRR bit

Description

bhyve/ioapic: improve the tracking of IRR bit

One common method of EOI'ing an interrupt at the IO-APIC level is to
switch the pin to edge triggering mode and then back into level mode.
That would cause the IRR bit to be cleared and thus further interrupts
to be injected. FreeBSD does indeed use that method if the IO-APIC EOI
register is not supported.

The bhyve IO-APIC emulation code didn't clear the IRR bit when doing
that switch, and was also missing acknowledging the IRR state when
trying to inject an interrupt in vioapic_send_intr.

Reviewed by: grehan
Differential revision: https://reviews.freebsd.org/D28238

Details

Provenance
roygerAuthored on Jan 19 2021, 11:52 AM
Reviewer
grehan
Differential Revision
D28238: bhyve/ioapic: improve the tracking of IRR bit
Parents
rGd7d067698a38: bhyve/ioapic: only account for asserted line in level mode
Branches
Unknown
Tags
Unknown