Re: [RFC PATCH v2 05/18] iommu/riscv: Prepare to use MSI table

Nutty.Liu
2025-10-05T08:30:35Z

On 9/21/2025 4:38 AM, Andrew Jones wrote:
> Capture the IMSIC layout from its config and reserve all the addresses.
> Then use the IMSIC layout info to calculate the maximum number of PTEs
> the MSI table needs to support and allocate the MSI table when attaching
> a paging domain for the first time. Finally, at the same time, map the
> IMSIC addresses in the stage1 DMA table when the stage1 DMA table is not
> BARE. This ensures it doesn't fault as it will translate the addresses
> before the MSI table does.
>
> Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
> ---
> drivers/iommu/riscv/iommu-ir.c | 186 +++++++++++++++++++++++++++++++++
> drivers/iommu/riscv/iommu.c | 6 ++
> drivers/iommu/riscv/iommu.h | 4 +
> 3 files changed, 196 insertions(+)
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>

Thanks,
Nutty