[PATCH v3 3/5] iommufd/selftest: Convert cache invalidation mocks to the core array loop

Pranjal Shrivastava praan at google.com
Tue Jul 14 06:06:57 PDT 2026


On Wed, Jul 08, 2026 at 12:44:18PM -0700, Nicolin Chen wrote:
> The vIOMMU and the nested-domain selftest invalidation mocks each used to
> walk the whole request array on their own, with the vIOMMU mock even
> allocating a buffer sized to the entire array in order to do so first.
> 
> The iommufd core now iterates the request array itself and re-invokes the
> op with the not-yet-handled sub-array, so handle just a single request per
> call out of the front of that sub-array and report one handled entry via
> the array->entry_num. Drop both of the loops and the kzalloc_objs() in the
> viommu callback function, and keep returning a success for an empty array
> as a probe of the selftest data type.
> 
> Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Nicolin Chen <nicolinc at nvidia.com>
 
Reviewed-by: Pranjal Shrivastava <praan at google.com>

Thanks,
Praan



More information about the linux-arm-kernel mailing list