diff options
author | 2019-03-20 09:58:34 +0800 | |
---|---|---|
committer | 2019-04-20 09:17:02 +0200 | |
commit | aca4bd1a1cc6084f74f2dba955270629a3fbf7b9 (patch) | |
tree | a3bd2c68c3c0f4fd36b13797bbcec7e8b6aa78d1 | |
parent | d965161274983e34caf8f38af287f0a1e2adbb27 (diff) | |
download | linux-yocto-aca4bd1a1cc6084f74f2dba955270629a3fbf7b9.tar.gz linux-yocto-aca4bd1a1cc6084f74f2dba955270629a3fbf7b9.tar.bz2 linux-yocto-aca4bd1a1cc6084f74f2dba955270629a3fbf7b9.zip |
iommu/vt-d: Save the right domain ID used by hardware
[ Upstream commit 84c11e4df5aa4955acaa441f0cf1cb2e50daf64b ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 68a21c49c562..53b1fbadc496 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -5331,7 +5331,7 @@ int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct intel_svm_dev *sd ctx_lo = context[0].lo; - sdev->did = domain->iommu_did[iommu->seq_id]; + sdev->did = FLPT_DEFAULT_DID; sdev->sid = PCI_DEVID(info->bus, info->devfn); if (!(ctx_lo & CONTEXT_PASIDE)) { |