Re: [PATCH v4 17/21] iommu/riscv: Report cache coherency capability

Jason Gunthorpe <[email protected]>
Newsgroups dev.linux.lists.iommu,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, Aug 20, 2026 at 11:41:46PM +0200, Andrew Jones wrote:
> VFIO and iommufd require IOMMU_CAP_CACHE_COHERENCY because they use
> IOMMU_CACHE mappings and have no userspace cache-maintenance path.
> 
> RISC-V page tables preserve physical memory attributes for IOMMU_CACHE
> mappings. Svpbmt marks mappings without IOMMU_CACHE as non-cacheable,
> but preserving physical attributes cannot make a noncoherent device
> path coherent.
> 
> Report the capability only for devices marked DMA coherent. This limits
> userspace assignment to paths that can honor cacheable mappings.
> 
> Signed-off-by: Andrew Jones <[email protected]>
> ---
>  drivers/iommu/riscv/iommu.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

Reviewed-by: Jason Gunthorpe <[email protected]>

You can send this outside this series?

Jason
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.