]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Use user privilege for RID2PASID translation
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 19 May 2021 01:50:27 +0000 (09:50 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 19 May 2021 06:51:02 +0000 (08:51 +0200)
commit8d8ec34388c4bb453361b1761b6f50d00c239cfe
treee527f468c831fb8b3d11048a0f4933bb3bab5d74
parent2292a9aeb5e9f9bd87ce46a75e71337100901278
iommu/vt-d: Use user privilege for RID2PASID translation

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: b5a05d56ddc7d ("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>
drivers/iommu/intel/iommu.c
drivers/iommu/intel/pasid.c