[RFC PATCH v2 08/18] iommu/riscv: Use MSI table to enable IMSIC access
Jinvas
jinvas at 126.com
Thu Oct 23 06:47:08 PDT 2025
On Mon, 22 Sep 2025 20:56:51 -0300, Jason Gunthorpe wrote:
> We no longer need to support 32 bit builds and we missed this while
> cleaning up.
> Right now the only way to deal with this would be to only use one of
> the S1 or S2 and make that decision when the iommu driver starts. You
> can return the right SW_MSI/HW_MSI based on which PAGING domain style
> the driver is going to use.
> I recommend if the S2 is available you make the driver always use the
> S2 for everything and ignore the S1 except for explicit two stage
> translation setup by a hypervisor. Thus always return HW_MSI.
> If the iommu does not support S2 then always use S1 and always return
> SW_MSI.
I strongly agree with this suggestion,
because on one hand, the confusing design of RISC-V â
particularly the translation rules of the msix_table â
leads to different translation behaviors in S1 and S2 modes;
on the other hand,
designing a proper caching mechanism for the msix_table
in both S1 and S2 modes is quite challenging.
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
Thanks for the patch!
Best regards,
jinvas
More information about the linux-riscv
mailing list