[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276EC6A22D3A3C9DE1C46678C37A@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Thu, 13 Jul 2023 07:52:09 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>,
Jean-Philippe Brucker <jean-philippe@...aro.com>,
"Robin Murphy" <robin.murphy@....com>
CC: Jason Gunthorpe <jgg@...dia.com>, Will Deacon <will@...nel.org>,
"Liu, Yi L" <yi.l.liu@...el.com>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"Luck, Tony" <tony.luck@...el.com>
Subject: RE: [PATCH v10 3/7] iommu/vt-d: Add domain_flush_pasid_iotlb()
> From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> Sent: Thursday, July 13, 2023 12:34 AM
> +static void domain_flush_pasid_iotlb(struct intel_iommu *iommu,
> + struct dmar_domain *domain, u64 addr,
> + unsigned long npages, bool ih)
> +{
> + u16 did = domain_id_iommu(domain, iommu);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&domain->lock, flags);
> + if (!list_empty(&domain->devices))
> + qi_flush_piotlb(iommu, did, IOMMU_NO_PASID, addr,
> npages, ih);
> + spin_unlock_irqrestore(&domain->lock, flags);
btw I gave a comment before that the check of list_empty() changes
the semantics instead of just creating a helper.
If it's the right thing to do please split it into a separate fix patch.
Powered by blists - more mailing lists