linux/drivers/iommu
Vasant Hegde 150bdf5f8d iommu/amd: Fix GT feature enablement again
Current code configures GCR3 even when device is attached to identity
domain. So that we can support SVA with identity domain. This means in
attach device path it updates Guest Translation related bits in DTE.

Commit de111f6b4f ("iommu/amd: Enable Guest Translation after reading
IOMMU feature register") missed to enable Control[GT] bit in resume
path. Its causing certain laptop to fail to resume after suspend.

This is because we have inconsistency between between control register
(GT is disabled) and DTE (where we have enabled guest translation related
bits) in resume path. And IOMMU hardware throws ILLEGAL_DEV_TABLE_ENTRY.

Fix it by enabling GT bit in resume path.

Reported-by: Błażej Szczygieł <spaz16@wp.pl>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218975
Fixes: de111f6b4f ("iommu/amd: Enable Guest Translation after reading IOMMU feature register")
Tested-by: Błażej Szczygieł <spaz16@wp.pl>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20240621101533.20216-1-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2024-06-27 12:14:19 +02:00
..
amd iommu/amd: Fix GT feature enablement again 2024-06-27 12:14:19 +02:00
arm Merge branches 'arm/renesas', 'arm/smmu', 'x86/amd', 'core' and 'x86/vt-d' into next 2024-05-13 14:06:54 +02:00
intel iommu/vt-d: Fix missed device TLB cache tag 2024-06-27 12:14:19 +02:00
iommufd iommufd: Add missing IOMMUFD_DRIVER kconfig for the selftest 2024-04-14 13:52:08 -03:00
apple-dart.c iommu: constify of_phandle_args in xlate 2024-03-01 13:46:57 +01:00
dma-iommu.c iommu/dma: Fix domain init 2024-06-04 13:54:09 +02:00
dma-iommu.h iommu/dma: Centralise iommu_setup_dma_ops() 2024-04-26 12:07:26 +02:00
exynos-iommu.c iommu/exynos: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:45 +02:00
fsl_pamu_domain.c iommu/fsl_pamu: Implement a PLATFORM domain 2023-09-25 11:40:54 +02:00
fsl_pamu_domain.h
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
hyperv-iommu.c x86/vector: Rename send_cleanup_vector() to vector_schedule_cleanup() 2023-08-06 14:15:09 +02:00
io-pgfault.c iommu: Make iommu_report_device_fault() return void 2024-02-16 15:19:37 +01:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Remove map/unmap 2022-11-19 10:44:15 +01:00
io-pgtable-arm.c iommu/io-pgtable-arm: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:44 +02:00
io-pgtable-arm.h
io-pgtable-dart.c iommu/io-pgtable-dart: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:44 +02:00
io-pgtable.c iommu: Allow passing custom allocators to pgtable drivers 2023-11-27 11:10:12 +01:00
iommu-debugfs.c
iommu-pages.h iommu: account IOMMU allocated memory 2024-04-15 14:31:48 +02:00
iommu-priv.h iommu: constify pointer to bus_type 2024-03-01 13:46:57 +01:00
iommu-sva.c iommu: Add ops->domain_alloc_sva() 2024-04-26 12:16:07 +02:00
iommu-sysfs.c iommu: Do not export iommu_device_link/unlink() 2023-07-14 16:14:15 +02:00
iommu-traces.c iommu: Remove detach_dev callback 2023-01-13 16:39:18 +01:00
iommu.c iommu/dma: Centralise iommu_setup_dma_ops() 2024-04-26 12:07:26 +02:00
iova.c iommu/iova: use named kmem_cache for iova magazines 2024-02-09 11:45:47 +01:00
ipmmu-vmsa.c Merge branches 'arm/mediatek', 'arm/renesas', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next 2024-03-08 09:05:59 +01:00
irq_remapping.c IOMMU Updates for Linux v6.10 2024-05-18 10:55:13 -07:00
irq_remapping.h iommu/vt-d: Allocate DMAR fault interrupts locally 2024-04-26 11:57:36 +02:00
Kconfig iommu/arm-smmu-v3: Make the kunit into a module 2024-05-10 14:14:14 +02:00
Makefile iommu: Separate SVA and IOPF 2024-02-16 15:19:29 +01:00
msm_iommu_hw-8xxx.h
msm_iommu.c iommu: constify of_phandle_args in xlate 2024-03-01 13:46:57 +01:00
msm_iommu.h
mtk_iommu_v1.c iommu: mtk: fix module autoloading 2024-04-12 12:04:50 +02:00
mtk_iommu.c iommu: mtk: fix module autoloading 2024-04-12 12:04:50 +02:00
of_iommu.c iommu: re-use local fwnode variable in iommu_ops_from_fwnode() 2024-03-01 13:47:01 +01:00
omap-iommu-debug.c
omap-iommu.c iommu: Mark dev_iommu_priv_set() with a lockdep 2023-12-12 10:18:49 +01:00
omap-iommu.h iommu/omap: Convert to generic_single_device_group() 2023-09-25 11:52:08 +02:00
omap-iopgtable.h
rockchip-iommu.c iommu/rockchip: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:45 +02:00
s390-iommu.c iommu/dma: Centralise iommu_setup_dma_ops() 2024-04-26 12:07:26 +02:00
sprd-iommu.c iommu: constify of_phandle_args in xlate 2024-03-01 13:46:57 +01:00
sun50i-iommu.c iommu/sun50i: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:46 +02:00
tegra-smmu.c iommu/tegra-smmu: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:46 +02:00
virtio-iommu.c virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00