mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-21 06:50:25 +00:00
iommu/vt-d: Use cache_tag_flush_all() in flush_iotlb_all
The flush_iotlb_all callback is called by the iommu core to flush all caches for the affected domain. Use cache_tag_flush_all() in this callback. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20240416080656.60968-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
446a68c58d
commit
4e589a5368
1 changed files with 1 additions and 19 deletions
|
@ -1557,25 +1557,7 @@ static void parent_domain_flush(struct dmar_domain *domain,
|
||||||
|
|
||||||
static void intel_flush_iotlb_all(struct iommu_domain *domain)
|
static void intel_flush_iotlb_all(struct iommu_domain *domain)
|
||||||
{
|
{
|
||||||
struct dmar_domain *dmar_domain = to_dmar_domain(domain);
|
cache_tag_flush_all(to_dmar_domain(domain));
|
||||||
struct iommu_domain_info *info;
|
|
||||||
unsigned long idx;
|
|
||||||
|
|
||||||
xa_for_each(&dmar_domain->iommu_array, idx, info) {
|
|
||||||
struct intel_iommu *iommu = info->iommu;
|
|
||||||
u16 did = domain_id_iommu(dmar_domain, iommu);
|
|
||||||
|
|
||||||
if (dmar_domain->use_first_level)
|
|
||||||
domain_flush_pasid_iotlb(iommu, dmar_domain, 0, -1, 0);
|
|
||||||
else
|
|
||||||
iommu->flush.flush_iotlb(iommu, did, 0, 0,
|
|
||||||
DMA_TLB_DSI_FLUSH);
|
|
||||||
|
|
||||||
iommu_flush_dev_iotlb(dmar_domain, 0, MAX_AGAW_PFN_WIDTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dmar_domain->nested_parent)
|
|
||||||
parent_domain_flush(dmar_domain, 0, -1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iommu_disable_protect_mem_regions(struct intel_iommu *iommu)
|
static void iommu_disable_protect_mem_regions(struct intel_iommu *iommu)
|
||||||
|
|
Loading…
Add table
Reference in a new issue