[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250227195036.GK39591@nvidia.com>
Date: Thu, 27 Feb 2025 15:50:36 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: robin.murphy@....com, joro@...tes.org, will@...nel.org,
alex.williamson@...hat.com, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH v1 2/4] iommu: Add iommu_default_domain_free helper
On Wed, Feb 26, 2025 at 12:16:05PM -0800, Nicolin Chen wrote:
> The iommu_put_dma_cookie() will be moved out of iommu_domain_free(). For a
> default domain, iommu_put_dma_cookie() can be simply added to this helper.
>
> Suggested-by: Jason Gunthorpe <jgg@...dia.com>
> Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> ---
> drivers/iommu/iommu.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
Let's try to do what Robin suggested and put a private_data_owner
value in the struct then this patch isn't used, we'd just do
if (domain->private_data_owner == DMA)
iommu_put_dma_cookie(domain);
Instead of this change and the similar VFIO change
Thanks,
Jason
Powered by blists - more mailing lists