linux/drivers/iommu/intel
Yanfei Xu 8a3b8e63f8 iommu/vt-d: Fix to flush cache of PASID directory table
Even the PCI devices don't support pasid capability, PASID table is
mandatory for a PCI device in scalable mode. However flushing cache
of pasid directory table for these devices are not taken after pasid
table is allocated as the "size" of table is zero. Fix it by
calculating the size by page order.

Found this when reading the code, no real problem encountered for now.

Fixes: 194b3348bd ("iommu/vt-d: Fix PASID directory pointer coherency")
Suggested-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Yanfei Xu <yanfei.xu@intel.com>
Link: https://lore.kernel.org/r/20230616081045.721873-1-yanfei.xu@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-08-09 17:46:19 +02: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: Replace spin_lock_irqsave() with spin_lock() 2022-07-15 10:21:36 +02:00
dmar.c Merge branches 'iommu/fixes', 'arm/allwinner', 'arm/exynos', 'arm/mediatek', 'arm/omap', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'ppc/pamu', 'unisoc', 'x86/vt-d', 'x86/amd', 'core' and 'platform-remove_new' into next 2023-04-14 13:45:50 +02:00
iommu.c iommu/vt-d: Remove rmrr check in domain attaching device path 2023-08-09 17:46:18 +02:00
iommu.h iommu/vt-d: Add set_dev_pasid callback for dma domain 2023-08-09 17:44:39 +02:00
irq_remapping.c x86,intel_iommu: Replace cmpxchg_double() 2023-06-05 09:36:38 +02:00
Kconfig IOMMU Updates for Linux 6.4 2023-04-30 13:00:38 -07:00
Makefile iommu/vt-d: Retrieve IOMMU perfmon capability information 2023-02-03 11:06:04 +01:00
pasid.c iommu/vt-d: Fix to flush cache of PASID directory table 2023-08-09 17:46:19 +02:00
pasid.h iommu: Generalize PASID 0 for normal DMA w/o PASID 2023-08-09 17:44:34 +02:00
perf.c iommu/vt-d: Move include/linux/intel-iommu.h under iommu 2022-07-15 10:21:31 +02: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: Make prq draining code generic 2023-08-09 17:44:37 +02: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