linux_dsm_epyc7002/drivers/iommu/intel
Liu Yi L 0ed1cd7dc5 iommu/vt-d: Fix incomplete cache flush in intel_pasid_tear_down_entry()
[ Upstream commit 8798d36411196da86e70b994725349c16c1119f6 ]

This fixes improper iotlb invalidation in intel_pasid_tear_down_entry().
When a PASID was used as nested mode, released and reused, the following
error message will appear:

[  180.187556] Unexpected page request in Privilege Mode
[  180.187565] Unexpected page request in Privilege Mode
[  180.279933] Unexpected page request in Privilege Mode
[  180.279937] Unexpected page request in Privilege Mode

Per chapter 6.5.3.3 of VT-d spec 3.3, when tear down a pasid entry, the
software should use Domain selective IOTLB flush if the PGTT of the pasid
entry is SL only or Nested, while for the pasid entries whose PGTT is FL
only or PT using PASID-based IOTLB flush is enough.

Fixes: 2cd1311a26 ("iommu/vt-d: Add set domain DOMAIN_ATTR_NESTING attr")
Signed-off-by: Kumar Sanjay K <sanjay.k.kumar@intel.com>
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Tested-by: Yi Sun <yi.y.sun@intel.com>
Link: https://lore.kernel.org/r/20210817042425.1784279-1-yi.l.liu@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210817124321.1517985-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 18:55:47 +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: Fix incomplete cache flush in intel_pasid_tear_down_entry() 2024-07-05 18:55:47 +02:00
pasid.h iommu/vt-d: Fix incomplete cache flush in intel_pasid_tear_down_entry() 2024-07-05 18:55:47 +02:00
svm.c iommu/vt-d: Consolidate duplicate cache invaliation code 2024-07-05 18:55:47 +02:00
trace.c