mirror-linux/drivers/iommu/intel
Lu Baolu add43c4fbc iommu/vt-d: Make intel_iommu_drain_pasid_prq() cover faults for RID
This driver supports page faults on PCI RID since commit <9f831c16c69e>
("iommu/vt-d: Remove the pasid present check in prq_event_thread") by
allowing the reporting of page faults with the pasid_present field cleared
to the upper layer for further handling. The fundamental assumption here
is that the detach or replace operations act as a fence for page faults.
This implies that all pending page faults associated with a specific RID
or PASID are flushed when a domain is detached or replaced from a device
RID or PASID.

However, the intel_iommu_drain_pasid_prq() helper does not correctly
handle faults for RID. This leads to faults potentially remaining pending
in the iommu hardware queue even after the domain is detached, thereby
violating the aforementioned assumption.

Fix this issue by extending intel_iommu_drain_pasid_prq() to cover faults
for RID.

Fixes: 9f831c16c6 ("iommu/vt-d: Remove the pasid present check in prq_event_thread")
Cc: stable@vger.kernel.org
Suggested-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20250121023150.815972-1-baolu.lu@linux.intel.com
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Link: https://lore.kernel.org/r/20250211005512.985563-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2025-02-14 09:12:47 +01:00
..
Kconfig iommu/vt-d: Move IOMMU_IOPF into INTEL_IOMMU 2024-11-05 13:32:26 +01:00
Makefile iommu/vt-d: Remove iommu cap audit 2025-01-07 09:30:51 +01:00
cache.c iommu/vt-d: Link cache tags of same iommu unit together 2025-01-07 09:30:53 +01:00
debugfs.c iommu/vt-d: Remove debugfs use of private data field 2024-04-26 11:57:38 +02:00
dmar.c iommu/vt-d: Remove unused dmar_msi_read 2024-11-05 13:32:21 +01:00
iommu.c iommufd 6.14 merge window pull 2025-01-24 12:04:35 -08:00
iommu.h iommu: Add ops->domain_alloc_nested() 2024-11-22 14:43:45 -04:00
irq_remapping.c IOMMU Updates for Linux v6.14 2025-01-24 07:33:46 -08:00
nested.c iommu: Add ops->domain_alloc_nested() 2024-11-22 14:43:45 -04:00
pasid.c iommu/vt-d: Draining PRQ in sva unbind path when FPD bit set 2025-01-07 09:30:52 +01:00
pasid.h iommu/vt-d: Draining PRQ in sva unbind path when FPD bit set 2025-01-07 09:30:52 +01:00
perf.c iommu/vt-d: Use kcalloc() instead of kzalloc() 2024-03-01 13:51:18 +01:00
perf.h iommu/vt-d: Remove debugfs use of private data field 2024-04-26 11:57:38 +02:00
perfmon.c iommu/vt-d: Clean up cpumask and hotplug for perfmon 2024-09-10 11:44:13 +02:00
perfmon.h
prq.c iommu/vt-d: Make intel_iommu_drain_pasid_prq() cover faults for RID 2025-02-14 09:12:47 +01:00
svm.c iommu/vt-d: Make intel_svm_set_dev_pasid() support domain replacement 2024-11-08 14:04:55 +01:00
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00