summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2019-05-21 09:30:16 +0200
committerJoerg Roedel <jroedel@suse.de>2019-05-27 16:32:43 +0200
commit66d78ad316b0e1ca5ae19663468554e2c0e31c26 (patch)
treeca8f7edba371c9ae32b5b8a71adbef53e869b264 /drivers
parentiommu/vt-d: Fix lock inversion between iommu->lock and device_domain_lock (diff)
downloadlinux-66d78ad316b0e1ca5ae19663468554e2c0e31c26.tar.xz
linux-66d78ad316b0e1ca5ae19663468554e2c0e31c26.zip
iommu/vt-d: Set the right field for Page Walk Snoop
Set the page walk snoop to the right bit, otherwise the domain id field will be overlapped. Reported-by: Dave Jiang <dave.jiang@intel.com> Fixes: 6f7db75e1c469 ("iommu/vt-d: Add second level page table interface") Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/intel-pasid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel-pasid.c
index 2fefeafda437..fe51d8af457f 100644
--- a/drivers/iommu/intel-pasid.c
+++ b/drivers/iommu/intel-pasid.c
@@ -389,7 +389,7 @@ static inline void pasid_set_present(struct pasid_entry *pe)
*/
static inline void pasid_set_page_snoop(struct pasid_entry *pe, bool value)
{
- pasid_set_bits(&pe->val[1], 1 << 23, value);
+ pasid_set_bits(&pe->val[1], 1 << 23, value << 23);
}
/*