summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel/svm.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2022-07-12 08:08:58 +0800
committerJoerg Roedel <jroedel@suse.de>2022-07-15 10:21:37 +0200
commit8430fd3f3287013cb3f04b465c0686c41c86a8c8 (patch)
treed007cc8d73ad3b142d6249d7b6ef0843d9977655 /drivers/iommu/intel/svm.c
parent2c3262f9e881ae403b6d92a7e4824531cdb63829 (diff)
downloadlinux-stable-8430fd3f3287013cb3f04b465c0686c41c86a8c8.tar.gz
linux-stable-8430fd3f3287013cb3f04b465c0686c41c86a8c8.tar.bz2
linux-stable-8430fd3f3287013cb3f04b465c0686c41c86a8c8.zip
iommu/vt-d: Acquiring lock in pasid manipulation helpers
The iommu->lock is used to protect the per-IOMMU pasid directory table and pasid table. Move the spinlock acquisition/release into the helpers to make the code self-contained. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20220706025524.2904370-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel/svm.c')
-rw-r--r--drivers/iommu/intel/svm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index 82288a50660d..64072e628bbd 100644
--- a/drivers/iommu/intel/svm.c
+++ b/drivers/iommu/intel/svm.c
@@ -394,11 +394,8 @@ static struct iommu_sva *intel_svm_bind_mm(struct intel_iommu *iommu,
sflags = (flags & SVM_FLAG_SUPERVISOR_MODE) ?
PASID_FLAG_SUPERVISOR_MODE : 0;
sflags |= cpu_feature_enabled(X86_FEATURE_LA57) ? PASID_FLAG_FL5LP : 0;
- spin_lock(&iommu->lock);
ret = intel_pasid_setup_first_level(iommu, dev, mm->pgd, mm->pasid,
FLPT_DEFAULT_DID, sflags);
- spin_unlock(&iommu->lock);
-
if (ret)
goto free_sdev;