iommu/vt-d: Acquiring lock in pasid manipulation helpers
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 12 Jul 2022 00:08:58 +0000 (08:08 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:21:37 +0000 (10:21 +0200)
commit8430fd3f3287013cb3f04b465c0686c41c86a8c8
treed007cc8d73ad3b142d6249d7b6ef0843d9977655
parent2c3262f9e881ae403b6d92a7e4824531cdb63829
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>
drivers/iommu/intel/iommu.c
drivers/iommu/intel/pasid.c
drivers/iommu/intel/svm.c