linux_dsm_epyc7002/drivers/iommu/intel
Lu Baolu a5212518b7 iommu/vt-d: Use user privilege for RID2PASID translation
[ Upstream commit 54c80d907400189b09548039be8f3b6e297e8ae3 ]

When first-level page tables are used for IOVA translation, we use user
privilege by setting U/S bit in the page table entry. This is to make it
consistent with the second level translation, where the U/S enforcement
is not available. Clear the SRE (Supervisor Request Enable) field in the
pasid table entry of RID2PASID so that requests requesting the supervisor
privilege are blocked and treated as DMA remapping faults.

Fixes: b802d070a5 ("iommu/vt-d: Use iova over first level")
Suggested-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210512064426.3440915-1-baolu.lu@linux.intel.com
Link: https://lore.kernel.org/r/20210519015027.108468-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-03 09:00:49 +02:00
..
debugfs.c iommu/vt-d: Rename intel-pasid.h to pasid.h 2020-07-24 10:51:21 +02:00
dmar.c iommu/vt-d: Fix sysfs leak in alloc_iommu() 2021-06-03 09:00:27 +02:00
iommu.c iommu/vt-d: Use user privilege for RID2PASID translation 2021-06-03 09:00:49 +02:00
irq_remapping.c iommu/intel: Fix memleak in intel_irq_remapping_alloc 2021-01-17 14:17:03 +01:00
Kconfig IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
Makefile iommu/vt-d: Move Kconfig and Makefile bits down into intel directory 2020-07-29 14:14:55 +02:00
pasid.c iommu/vt-d: Use user privilege for RID2PASID translation 2021-06-03 09:00:49 +02:00
pasid.h iommu/vt-d: Report right snoop capability when using FL for IOVA 2021-05-14 09:50:32 +02:00
svm.c iommu/vt-d: Report the right page fault address 2021-05-14 09:50:33 +02:00
trace.c iommu/vt-d: Move Intel IOMMU driver into subdirectory 2020-06-10 17:46:43 +02:00