Re: [PATCH v6 0/5] iommufd: Iterate the cache invalidation array in the core

From: Jason Gunthorpe

Date: Wed Sep 09 2026 - 14:32:55 EST


On Sun, Aug 30, 2026 at 03:26:37PM -0700, Nicolin Chen wrote:
> The vIOMMU cache_invalidate() and the nested-HWPT cache_invalidate_user()
> ops are each handed the full user invalidation array and must report, via
> array->entry_num, how many of its entries they handled. That makes every
> driver open-code the same array walk, with real downsides:
[..]
> Nicolin Chen (5):
> iommu/arm-smmu-v3-iommufd: Reject unsupported bits in invalidation
> commands
> iommufd: Iterate the cache invalidation array in the core
> iommufd/selftest: Convert cache invalidation mocks to the core array
> loop
> iommu/arm-smmu-v3-iommufd: Convert cache invalidation to the core
> array loop
> iommu/vt-d: Convert nested cache invalidation to the core array loop
>
> include/linux/iommu.h | 6 +-
> include/linux/iommufd.h | 2 +
> include/uapi/linux/iommufd.h | 4 +-
> .../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 197 ++++++++++++++----
> drivers/iommu/intel/nested.c | 54 ++---
> drivers/iommu/iommufd/hw_pagetable.c | 25 ++-
> drivers/iommu/iommufd/selftest.c | 147 +++++++------
> 7 files changed, 282 insertions(+), 153 deletions(-)

Will, can I pick this up, or did you want a branch or something?

Thanks,
Jason