]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
msi: report error for attempt to use APIC ID > 255
authorEd Maste <emaste@FreeBSD.org>
Tue, 8 Aug 2023 23:42:09 +0000 (19:42 -0400)
committerEd Maste <emaste@FreeBSD.org>
Thu, 17 Aug 2023 14:06:39 +0000 (10:06 -0400)
commit044dfb356bb6481af4de4ed0f7ef04c3b638bf71
treecf63725b837936601f97d18e36334702d8fa8be7
parent1fb7c59981bc5d4c522521df067caaaa85c42cdb
msi: report error for attempt to use APIC ID > 255

The MSI/MSI-X address includes 8 bits to encode the Destination ID.
Previously IDs over 255 overlapped with the fixed portion of the
address, resulting in an invalid value (and a nonfunctional interrupt).

Instead, print an error message and return EINVAL.  The interrupt will
still not work, but the user will have a clue as to why.

PR: 273022
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41395

(cherry picked from commit cbf845052f1c2862a64e66dbaf38e887a7592474)
sys/x86/x86/msi.c