HomeFreeBSD

msi: handle error from BUS_REMAP_INTR in msi_assign_cpu

Description

msi: handle error from BUS_REMAP_INTR in msi_assign_cpu

Previously errors from BUS_REMAP_INTR were silently ignored, and we
ended up with non-functional interrupts.

Now we allocate and enable new vectors, but postpone assignment of new
APIC IDs and vectors where we can, until after BUS_REMAP_INTR is
successful. We then disable and free the old vectors.

If BUS_REMAP_INTR fails we restore the old configuration, and disable
and free the new, unused vectors.

Thanks to AMD for providing hardware (with APIC IDs above 255) for
testing.

Reviewed by: jhb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41455

Details

Provenance
emasteAuthored on Aug 14 2023, 4:56 PM
Reviewer
jhb
Differential Revision
D41455: msi: report error from BUS_REMAP_INTR
Parents
rG91d0876a20ce: arm64 makectx: Fix overflow of tf_x array
Branches
Unknown
Tags
Unknown