Page MenuHomeFreeBSD

io_apic: Don't route to APIC ID > 255
Needs ReviewPublic

Authored by cperciva on Sat, Mar 14, 6:31 PM.
Tags
None
Referenced Files
F148615112: D55857.id173698.diff
Thu, Mar 19, 4:00 AM
Unknown Object (File)
Tue, Mar 17, 6:17 AM
Unknown Object (File)
Sat, Mar 14, 11:31 PM
Subscribers

Details

Reviewers
kib
jhb
emaste
Summary

I/O APIC Redirection Table Entries use 8 bits encode the Destination ID.
Attempting to route an IRQ to a higher APIC ID would result in it being
silently routed to the value reduced modulo 256, causing a panic if the
IRQ fired since the receiving CPU would not expect that IRQ.

Instead, print an error message and mask the interrupt. Note that we
also check io_cpu in ioapic_enable_source and force the mask bit back
on despite the request to remove it.

Tested on: EC2 r8i.96xlarge
MFC after: 1 month
Sponsored by: Amazon

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71405
Build 68288: arc lint + arc unit

Event Timeline

Add comment about keeping interrupt masked even when "enabling" it.

Did you tried enabling DMAR/AMD IOMMU and interrupt remapping on this machine?

In D55857#1278564, @kib wrote:

Did you tried enabling DMAR/AMD IOMMU and interrupt remapping on this machine?

This (virtual) machine doesn't have a proper IOMMU. See http://david.woodhou.se/15-bit-msi.pdf for context.