Re: [PATCH v4 17/21] iommu/riscv: Report cache coherency capability
Andrew Jones <[email protected]>
| Newsgroups | org.infradead.lists.linux-riscv,dev.linux.lists.iommu,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <dvh336e6ra47vkg2rahzgsqsq53ryl2cc6lkb3lapsee744bal@5z37ncf2t2kh> |
On Thu, Aug 20, 2026 at 06:47:30PM -0300, Jason Gunthorpe wrote: > 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? Sure Thanks, drew _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv