[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YQPEWzJq+7Jfu9+/@myrica>
Date: Fri, 30 Jul 2021 11:20:27 +0200
From: Jean-Philippe Brucker <jean-philippe@...aro.org>
To: Robin Murphy <robin.murphy@....com>
Cc: joro@...tes.org, will@...nel.org, linux-kernel@...r.kernel.org,
dianders@...omium.org, iommu@...ts.linux-foundation.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 11/24] iommu/virtio: Drop IOVA cookie management
On Wed, Jul 28, 2021 at 04:58:32PM +0100, Robin Murphy wrote:
> The core code bakes its own cookies now.
>
> CC: Jean-Philippe Brucker <jean-philippe@...aro.org>
> Signed-off-by: Robin Murphy <robin.murphy@....com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@...aro.org>
Also tested on the Seattle (vsmmuv3/viommu with lazy/strict, still need to
test the runtime switch).
> ---
> drivers/iommu/virtio-iommu.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
> index 6abdcab7273b..80930ce04a16 100644
> --- a/drivers/iommu/virtio-iommu.c
> +++ b/drivers/iommu/virtio-iommu.c
> @@ -598,12 +598,6 @@ static struct iommu_domain *viommu_domain_alloc(unsigned type)
> spin_lock_init(&vdomain->mappings_lock);
> vdomain->mappings = RB_ROOT_CACHED;
>
> - if (type == IOMMU_DOMAIN_DMA &&
> - iommu_get_dma_cookie(&vdomain->domain)) {
> - kfree(vdomain);
> - return NULL;
> - }
> -
> return &vdomain->domain;
> }
>
> @@ -643,8 +637,6 @@ static void viommu_domain_free(struct iommu_domain *domain)
> {
> struct viommu_domain *vdomain = to_viommu_domain(domain);
>
> - iommu_put_dma_cookie(domain);
> -
> /* Free all remaining mappings (size 2^64) */
> viommu_del_mappings(vdomain, 0, 0);
>
> --
> 2.25.1
>
> _______________________________________________
> iommu mailing list
> iommu@...ts.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
Powered by blists - more mailing lists