linux-stable/drivers/iommu
Yanfei Xu 426bd74187 iommu/vt-d: Fix to flush cache of PASID directory table
[ Upstream commit 8a3b8e63f8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-19 12:22:46 +02:00
..
amd iommu/amd/iommu_v2: Fix pasid_state refcount dec hit 0 warning on pasid unbind 2023-09-19 12:22:43 +02:00
arm iommu/qcom: Disable and reset context bank before programming 2023-09-19 12:22:46 +02:00
intel iommu/vt-d: Fix to flush cache of PASID directory table 2023-09-19 12:22:46 +02:00
apple-dart.c
dma-iommu.c
exynos-iommu.c
fsl_pamu.c iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe() 2022-12-31 13:14:35 +01:00
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
hyperv-iommu.c
io-pgfault.c
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit 2022-08-25 11:40:41 +02:00
io-pgtable-arm.c
io-pgtable-arm.h
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sva-lib.c
iommu-sva-lib.h
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Fix error unwind in iommu_group_alloc() 2023-03-10 09:39:42 +01:00
iova.c iommu/iova: Fix alloc iova overflows issue 2023-01-18 11:48:52 +01:00
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
Kconfig
Makefile
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c
mtk_iommu.h
mtk_iommu_v1.c iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() 2023-01-18 11:48:52 +01:00
of_iommu.c
omap-iommu-debug.c iommu/omap: Fix buffer overflow in debugfs 2022-10-26 12:35:25 +02:00
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu: rockchip: Fix directory table address encoding 2023-09-19 12:22:43 +02:00
s390-iommu.c
sprd-iommu.c iommu/sprd: Add missing force_aperture 2023-09-19 12:22:45 +02:00
sun50i-iommu.c iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY 2022-12-31 13:14:35 +01:00
tegra-gart.c
tegra-smmu.c
virtio-iommu.c