Skip to content

Commit 150bdf5

Browse files
hegdevasantjoergroedel
authored andcommitted
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 de111f6 ("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ł <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=218975 Fixes: de111f6 ("iommu/amd: Enable Guest Translation after reading IOMMU feature register") Tested-by: Błażej Szczygieł <[email protected]> Signed-off-by: Vasant Hegde <[email protected]> Reviewed-by: Jerry Snitselaar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 041be27 commit 150bdf5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iommu/amd/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,6 +2743,7 @@ static void early_enable_iommu(struct amd_iommu *iommu)
27432743
iommu_enable_command_buffer(iommu);
27442744
iommu_enable_event_buffer(iommu);
27452745
iommu_set_exclusion_range(iommu);
2746+
iommu_enable_gt(iommu);
27462747
iommu_enable_ga(iommu);
27472748
iommu_enable_xt(iommu);
27482749
iommu_enable_irtcachedis(iommu);

0 commit comments

Comments
 (0)