linux-stable/drivers/iommu
Yanfei Xu a793bbfd1a 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-13 09:48:30 +02:00
..
amd iommu/amd/iommu_v2: Fix pasid_state refcount dec hit 0 warning on pasid unbind 2023-09-13 09:48:25 +02:00
arm iommu/qcom: Disable and reset context bank before programming 2023-09-13 09:48:30 +02:00
intel iommu/vt-d: Fix to flush cache of PASID directory table 2023-09-13 09:48:30 +02:00
iommufd iommufd: Fix locking around hwpt allocation 2023-09-13 09:48:20 +02:00
Kconfig iommu: Make IPMMU_VMSA dependencies more strict 2023-05-22 17:00:34 +02:00
Makefile iommu: Remove ioasid infrastructure 2023-03-31 10:03:31 +02:00
apple-dart.c iommu/apple-dart: Convert to platform remove callback returning void 2023-03-31 10:01:55 +02:00
dma-iommu.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
dma-iommu.h
exynos-iommu.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
fsl_pamu.c iommu/fsl: fix all kernel-doc warnings in fsl_pamu.c 2023-03-22 14:50:15 +01:00
fsl_pamu.h
fsl_pamu_domain.c iommu/fsl_pamu: Fix compile error after adding set_platform_dma_ops 2023-01-13 22:30:55 +01:00
fsl_pamu_domain.h
hyperv-iommu.c
io-pgfault.c
io-pgtable-arm-v7s.c
io-pgtable-arm.c
io-pgtable-arm.h
io-pgtable-dart.c
io-pgtable.c
iommu-debugfs.c
iommu-sva.c iommu/sva: Fix signedness bug in iommu_sva_alloc_pasid() 2023-07-27 08:56:56 +02:00
iommu-sva.h iommu: Remove ioasid infrastructure 2023-03-31 10:03:31 +02:00
iommu-sysfs.c
iommu-traces.c iommu: Remove detach_dev callback 2023-01-13 16:39:18 +01:00
iommu.c iommu: Remove kernel-doc warnings 2023-09-13 09:48:29 +02:00
iova.c iommu/iova: Fix alloc iova overflows issue 2023-01-13 13:46:31 +01:00
ipmmu-vmsa.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
irq_remapping.c
irq_remapping.h
msm_iommu.c iommu/msm: Convert to platform remove callback returning void 2023-03-31 10:01:57 +02:00
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu/mediatek: Fix two IOMMU share pagetable issue 2023-09-13 09:48:29 +02:00
mtk_iommu_v1.c iommu/mtk_iommu_v1: Convert to platform remove callback returning void 2023-03-31 10:01:58 +02:00
of_iommu.c iommu/of: mark an unused function as __maybe_unused 2023-02-16 10:17:31 +01:00
omap-iommu-debug.c
omap-iommu.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
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu: rockchip: Fix directory table address encoding 2023-09-13 09:48:25 +02:00
s390-iommu.c iommufd for 6.3 2023-02-24 14:34:12 -08:00
sprd-iommu.c iommu/sprd: Add missing force_aperture 2023-09-13 09:48:29 +02:00
sun50i-iommu.c iommu/sun50i: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:52 -07:00
tegra-gart.c iommu: Add set_platform_dma_ops callbacks 2023-01-13 16:39:16 +01:00
tegra-smmu.c IOMMU Updates for Linux v6.3: 2023-02-24 13:40:13 -08:00
virtio-iommu.c iommu/virtio: Return size mapped for a detached domain 2023-07-19 16:35:46 +02:00