linux/drivers/iommu/intel
Ethan Zhao 80a9b50c0b iommu/vt-d: Improve ITE fault handling if target device isn't present
Because surprise removal could happen anytime, e.g. user could request safe
removal to EP(endpoint device) via sysfs and brings its link down to do
surprise removal cocurrently. such aggressive cases would cause ATS
invalidation request issued to non-existence target device, then deadly
loop to retry that request after ITE fault triggered in interrupt context.
this patch aims to optimize the ITE handling by checking the target device
presence state to avoid retrying the timeout request blindly, thus avoid
hard lockup or system hang.

Devices TLB should only be invalidated when devices are in the
iommu->device_rbtree (probed, not released) and present.

Fixes: 6ba6c3a4ca ("VT-d: add device IOTLB invalidation support")
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Ethan Zhao <haifeng.zhao@linux.intel.com>
Link: https://lore.kernel.org/r/20240301080727.3529832-4-haifeng.zhao@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2024-03-06 17:35:55 +01:00
..
cap_audit.c iommu/vt-d: Remove virtual command interface 2023-03-31 10:03:21 +02:00
cap_audit.h iommu/vt-d: Check FL and SL capability sanity in scalable mode 2021-10-18 12:31:48 +02:00
debugfs.c iommu/vt-d: Remove unused vcmd interfaces 2023-12-19 14:32:28 +01:00
dmar.c iommu/vt-d: Improve ITE fault handling if target device isn't present 2024-03-06 17:35:55 +01:00
iommu.c iommu/vt-d: Use device rbtree in iopf reporting path 2024-03-01 13:51:21 +01:00
iommu.h iommu/vt-d: Use device rbtree in iopf reporting path 2024-03-01 13:51:21 +01:00
irq_remapping.c x86/apic: Drop apic::delivery_mode 2023-11-21 16:58:54 +01:00
Kconfig iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA 2024-03-01 13:51:17 +01:00
Makefile iommu/vt-d: Add helper for nested domain allocation 2023-10-26 11:16:33 -03:00
nested.c iommu/vt-d: Add iotlb flush for nested domain 2024-01-11 15:53:28 -04:00
pasid.c iommu/vt-d: Don't issue ATS Invalidation request when device is disconnected 2024-03-06 17:35:55 +01:00
pasid.h iommu/vt-d: Move inline helpers to header files 2023-12-19 14:33:24 +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: Add common code for dmar latency performance monitors 2021-06-10 09:06:13 +02:00
perfmon.c iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug 2023-03-31 10:06:16 +02:00
perfmon.h iommu/vt-d: Add IOMMU perfmon support 2023-02-03 11:06:06 +01:00
svm.c iommu/vt-d: Use device rbtree in iopf reporting path 2024-03-01 13:51:21 +01:00
trace.c iommu/vt-d: Move trace/events/intel_iommu.h under iommu 2022-07-15 10:21:28 +02:00
trace.h iommu/vt-d: Move include/linux/intel-iommu.h under iommu 2022-07-15 10:21:31 +02:00