Re: [PATCH v2 5/8] iommu/arm-smmu-v3: Skip cd sync if CD table isn't active

From: Jason Gunthorpe
Date: Tue Aug 01 2023 - 10:14:16 EST


On Mon, Jul 31, 2023 at 06:48:15PM +0800, Michael Shavit wrote:
> This commit explicitly keeps track of whether a CD table is installed in
> an STE so that arm_smmu_sync_cd can skip the sync when unnecessary. This
> was previously achieved through the domain->devices list, but we are
> moving to a model where arm_smmu_sync_cd directly operates on a master
> and the master's CD table instead of a domain.
>
> Signed-off-by: Michael Shavit <mshavit@xxxxxxxxxx>
> ---
>
> Changes in v2:
> - Store field as a bit instead of a bool. Fix comment about STE being
> live before the sync in write_ctx_desc().

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason