[PATCH v6 02/16] iommufd: Convert struct iommufd_sw_msi_maps to a growable bitmap
Jason Gunthorpe
jgg at nvidia.com
Thu Oct 15 12:35:27 PDT 2026
> struct iommufd_sw_msi_maps uses a fixed 64-bit bitmap, limiting each
> group and hardware page table to 64 software MSI mappings. RISC-V
> interrupt remapping needs a mapping for every possible CPU, so this
> limit is insufficient.
This seems like the wrong usage to me.
The mapping bitmap is supposed to track mapping requests, not pages.
Prior to riscv those were the same thing, but as Robin is going for
riscv really should only make a single request to make a large
non-contiguous range.
Since we don't seem to have a use case for two of these we don't need
to have any of this tracking. If a range request comes in then it goes
to the start of the reserved SW_MSI range and that's it. The page list
is always the same and the start is always the same, so you don't have
the ARM problem this bitmap is trying to solve.
Simplify it away and a bunch of these patches disappear.
--
Jason
More information about the linux-riscv
mailing list