Patch "iommu/amd: Fix GT feature enablement again" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iommu/amd: Fix GT feature enablement again

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iommu-amd-fix-gt-feature-enablement-again.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit feda8a588e9d026f68b89fc5f1921b92153cb544
Author: Vasant Hegde <vasant.hegde@xxxxxxx>
Date:   Fri Jun 21 10:15:33 2024 +0000

    iommu/amd: Fix GT feature enablement again
    
    [ Upstream commit 150bdf5f8d8f805d70bebbbfd07697bd2416771a ]
    
    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 de111f6b4f6a ("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@xxxxx>
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=218975
    Fixes: de111f6b4f6a ("iommu/amd: Enable Guest Translation after reading IOMMU feature register")
    Tested-by: Błażej Szczygieł <spaz16@xxxxx>
    Signed-off-by: Vasant Hegde <vasant.hegde@xxxxxxx>
    Reviewed-by: Jerry Snitselaar <jsnitsel@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240621101533.20216-1-vasant.hegde@xxxxxxx
    Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index e740dc54c4685..21798a0fa9268 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -2784,6 +2784,7 @@ static void early_enable_iommu(struct amd_iommu *iommu)
 	iommu_enable_command_buffer(iommu);
 	iommu_enable_event_buffer(iommu);
 	iommu_set_exclusion_range(iommu);
+	iommu_enable_gt(iommu);
 	iommu_enable_ga(iommu);
 	iommu_enable_xt(iommu);
 	iommu_enable_irtcachedis(iommu);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux