Re: [PATCH v3 5/5] iommu/vt-d: Convert nested cache invalidation to the core array loop

From: Baolu Lu

Date: Mon Jul 13 2026 - 02:01:39 EST


On 7/9/26 03:44, Nicolin Chen wrote:
intel_nested_cache_invalidate_user() used to walk the whole request array
on its own, copying and then flushing one single entry at a time.

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. An empty array keeps returning a success, used as a
probe of IOMMU_HWPT_INVALIDATE_DATA_VTD_S1 support.

Reviewed-by: Kevin Tian<kevin.tian@xxxxxxxxx>
Assisted-by:Claude:claude-opus-4-8
Signed-off-by: Nicolin Chen<nicolinc@xxxxxxxxxx>
---
drivers/iommu/intel/nested.c | 54 ++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 24 deletions(-)

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>