Re: [PATCH v5 4/5] vfio/iommu_type1: Clean up update_dirty_scope in detach_group()

From: Jason Gunthorpe
Date: Fri Jul 29 2022 - 13:34:41 EST


On Fri, Jul 01, 2022 at 02:44:54PM -0700, Nicolin Chen wrote:
> All devices in emulated_iommu_groups have pinned_page_dirty_scope
> set, so the update_dirty_scope in the first list_for_each_entry
> is always false. Clean it up, and move the "if update_dirty_scope"
> part from the detach_group_done routine to the domain_list part.
>
> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
> ---
> drivers/vfio/vfio_iommu_type1.c | 27 ++++++++++++---------------
> 1 file changed, 12 insertions(+), 15 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason