Re: [PATCH] iommu/sva: remove iommu_sva_present flag

From: Jason Gunthorpe

Date: Thu Aug 27 2026 - 09:13:06 EST


On Sun, Aug 23, 2026 at 05:24:36PM +0800, Zhaoyu Liu wrote:
> The global iommu_sva_present bool merely mirrors
> !list_empty(&iommu_sva_mms) under the same mutex. Remove it and rely
> on list_for_each_entry to handle the empty list case, which is a no-op.
>
> Signed-off-by: Zhaoyu Liu <liuzhaoyu.zackary@xxxxxxxxxxxxx>
> ---
> drivers/iommu/iommu-sva.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason