diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2019-03-19 21:58:34 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-03-22 07:02:27 -0400 |
commit | 84c11e4df5aa4955acaa441f0cf1cb2e50daf64b (patch) | |
tree | 6dff3aec9c1a046b9edf38f397aa17b75ec4d349 | |
parent | 5bb71fc790a88d063507dc5d445ab8b14e845591 (diff) |
iommu/vt-d: Save the right domain ID used by hardware
The driver sets a default domain id (FLPT_DEFAULT_DID) in the
first level only pasid entry, but saves a different domain id
in @sdev->did. The value saved in @sdev->did will be used to
invalidate the translation caches. Hence, the driver might
result in invalidating the caches with a wrong domain id.
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Fixes: 1c4f88b7f1f92 ("iommu/vt-d: Shared virtual address in scalable mode")
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/intel-iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f002d47d2f27..28cb713d728c 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -5335,7 +5335,7 @@ int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct intel_svm_dev *sd | |||
5335 | 5335 | ||
5336 | ctx_lo = context[0].lo; | 5336 | ctx_lo = context[0].lo; |
5337 | 5337 | ||
5338 | sdev->did = domain->iommu_did[iommu->seq_id]; | 5338 | sdev->did = FLPT_DEFAULT_DID; |
5339 | sdev->sid = PCI_DEVID(info->bus, info->devfn); | 5339 | sdev->sid = PCI_DEVID(info->bus, info->devfn); |
5340 | 5340 | ||
5341 | if (!(ctx_lo & CONTEXT_PASIDE)) { | 5341 | if (!(ctx_lo & CONTEXT_PASIDE)) { |