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

Re: [PATCH v2 09/19] iommufd: Allow hwpt_id to carry viommu_id for IOMMU_HWPT_INVALIDATE

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

On Tue, Aug 27, 2024 at 09:59:46AM -0700, Nicolin Chen wrote:
With a VIOMMU object, use space can flush any IOMMU related cache that can
be directed using the viommu. It is similar to IOMMU_HWPT_INVALIDATE uAPI,
but can cover a wider range than IOTLB, such as device cache or desciprtor
cache.

Allow hwpt_id of the iommu_hwpt_invalidate structure to carry a viommu_id,
and reuse the IOMMU_HWPT_INVALIDATE uAPI for VIOMMU invalidations. Driver
can define a different structure for VIOMMU invalidations v.s. HWPT ones.

Update the uAPI, kdoc, and selftest case accordingly.

Signed-off-by: Nicolin Chen <redacted>
---
 drivers/iommu/iommufd/hw_pagetable.c    | 32 +++++++++++++++++++------
 include/uapi/linux/iommufd.h            |  9 ++++---
 tools/testing/selftests/iommu/iommufd.c |  4 ++--
 3 files changed, 33 insertions(+), 12 deletions(-)
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