Skip to content

Commit 48739af

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Get domain ID before clear pasid entry
After tearing down a pasid entry, the domain id is used to invalidate the translation caches. Retrieve the domain id from the pasid entry value before clearing the pasid entry. Otherwise, we will always use domain id 0. Cc: Ashok Raj <ashok.raj@intel.com> Cc: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Liu Yi L <yi.l.liu@intel.com> Fixes: 6f7db75 ("iommu/vt-d: Add second level page table interface") Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent c56cba5 commit 48739af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/intel-pasid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ void intel_pasid_tear_down_entry(struct intel_iommu *iommu,
466466
if (WARN_ON(!pte))
467467
return;
468468

469-
intel_pasid_clear_entry(dev, pasid);
470469
did = pasid_get_domain_id(pte);
470+
intel_pasid_clear_entry(dev, pasid);
471471

472472
if (!ecap_coherent(iommu->ecap))
473473
clflush_cache_range(pte, sizeof(*pte));

0 commit comments

Comments
 (0)