Thread (149 messages) 149 messages, 7 authors, 2025-05-12

Re: [PATCH v2 08/19] iommufd/viommu: Add cache_invalidate for IOMMU_VIOMMU_TYPE_DEFAULT

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2024-09-05 16:05:08
Also in: linux-iommu, linux-kselftest, lkml

On Tue, Aug 27, 2024 at 09:59:45AM -0700, Nicolin Chen wrote:
Add a default_viommu_ops with a new op for cache invaldiation, similar to
the cache_invalidate_user op in structure iommu_domain_ops, but wider. An
IOMMU driver that allocated a nested domain with a core-managed viommu is
able to use the same viommu pointer for this cache invalidation API.

ARM SMMUv3 for example supports IOTLB and ATC device cache invaldiations.
The IOTLB invalidation is per-VMID, held currently by a parent S2 domain.
The ATC invalidation is per device (Stream ID) that should be tranlsated
by a virtual device ID lookup table. Either case fits the viommu context.

Signed-off-by: Nicolin Chen <redacted>
---
 drivers/iommu/iommufd/iommufd_private.h |  3 +++
 drivers/iommu/iommufd/viommu.c          |  3 +++
 include/linux/iommu.h                   |  5 +++++
 include/linux/iommufd.h                 | 19 +++++++++++++++++++
 4 files changed, 30 insertions(+)
It looks OK

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help