Re: [PATCH] PCI/MSI: Skip address mask check for MSI-X entries
From: Yu Yang
Date: Wed Nov 11 2026 - 20:45:58 EST
Hi Thomas,
Thanks for the review and the suggested approach.
> The core cannot rely on random implementation details of drivers and
> architecture code. It fails gracefully when the provided address limit
> is violated to prevent hard to diagnose subsequent failures.
I agree, and I am not proposing to rely on those details. My concern with
the pci_msi_broken approach is that it disables MSI unconditionally,
including on platforms where the MSI allocator returns a 32-bit address
and MSI works fine. ahci_init_irq() uses MSI as the first choice for
single-port controllers and as a fallback for multi-port controllers, so
this would cause a functional regression on such systems (falling back to
MSI-X or INTx instead of MSI).
> Coming back to your AHCI controller. That's broken to begin with. Assume
> that MSI-X is not supported then MSI setup would fail the same way. You
> don't notice because MSI-X is always enabled on x86 platforms.
Understood. The device's MSI capability is 32-bit while its MSI-X
capability uses 64-bit addresses.
Would a device-specific flag meaning "MSI-X supports 64-bit addresses
even though the MSI capability is 32-bit" be acceptable? That would keep
MSI enabled with the existing 32-bit msi_addr_mask, use a 64-bit mask for
MSI-X, and keep the verification in place instead of skipping it. The
quirk would only affect this ZX-200 AHCI device.
Please let me know which direction you and Bjorn prefer. I will also fix
the Fixes: tag as pointed out by the Sashiko review.
Thanks,
Yu