The MSI/MSI-X address includes 8 bits to encode the Destination ID (CPU/APIC ID). Previously IDs over 255 overlapped with the fixed portion of the address, resulting in an invalid value. Instead, print an error message and return EINVAL.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
My hope here is to provide a bread-crumb if anyone tries running on systems with high CPU counts. Ideally I think this would become a KASSERT, with higher levels either relying on IOMMU or not assigning to CPUs > 255.
Comment Actions
I suggested something like this on IRC yesterday, yes. I think it's fine to just fail here rather than panicking as it is a bit nicer to the user.
sys/x86/x86/msi.c | ||
---|---|---|
624 |
sys/x86/x86/msi.c | ||
---|---|---|
624 | I was a bit surprised that it was msi_cpu, is this historical leftovers? (I.e., would we use msi_apic_id if writing this anew?) |