Skip to content

Commit

Permalink
iommu/vt-d: Save the right domain ID used by hardware
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Jacob Pan <[email protected]>
Fixes: 1c4f88b ("iommu/vt-d: Shared virtual address in scalable mode")
Signed-off-by: Liu Yi L <[email protected]>
Signed-off-by: Lu Baolu <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
LuBaolu authored and joergroedel committed Mar 22, 2019
1 parent 5bb71fc commit 84c11e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5335,7 +5335,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)) {
Expand Down

0 comments on commit 84c11e4

Please sign in to comment.