1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/iommu/amd
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.h iommu/amd: Check EFR[EPHSup] bit before enabling PPR 2024-06-04 13:59:52 +02:00
amd_iommu_types.h iommu/amd: Add SVA domain support 2024-04-26 12:16:08 +02:00
debugfs.c iommu/amd: Move AMD IOMMU driver into subdirectory 2020-06-10 17:46:42 +02:00
init.c iommu/amd: Fix GT feature enablement again 2024-06-27 12:14:19 +02:00
io_pgtable.c iommu/amd: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:42 +02:00
io_pgtable_v2.c iommu/amd: use page allocation function provided by iommu-pages.h 2024-04-15 14:31:42 +02:00
iommu.c iommu/amd: Invalidate cache before removing device from domain list 2024-06-27 12:13:48 +02:00
Kconfig iommu/amd: Fix compilation error 2024-05-03 12:12:16 +02:00
Makefile iommu/amd: Initial SVA support for AMD IOMMU 2024-04-26 12:16:05 +02:00
pasid.c Merge branches 'arm/renesas', 'arm/smmu', 'x86/amd', 'core' and 'x86/vt-d' into next 2024-05-13 14:06:54 +02:00
ppr.c iommu/amd: Fix Invalid wait context issue 2024-06-04 14:00:59 +02:00
quirks.c iommu/amd: Include PCI segment ID when initialize IOMMU 2022-07-07 09:37:51 +02:00