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

Jason Gunthorpe
2022-07-29T17:34:40Z

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@nvidia.com>
> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/vfio/vfio_iommu_type1.c | 27 ++++++++++++---------------
> 1 file changed, 12 insertions(+), 15 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason