Re: [PATCH v3 3/5] iommufd/selftest: Convert cache invalidation mocks to the core array loop
From: Pranjal Shrivastava
Date: Tue Jul 14 2026 - 09:19:14 EST
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@xxxxxxxxx>
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
Reviewed-by: Pranjal Shrivastava <praan@xxxxxxxxxx>
Thanks,
Praan