Patch "iommu/amd: Enable Guest Translation after reading IOMMU feature register" 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: Enable Guest Translation after reading IOMMU feature register

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-enable-guest-translation-after-reading-iom.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 c8b946c02a0292820c903fad5adafc6866c4d334
Author: Vasant Hegde <vasant.hegde@xxxxxxx>
Date:   Mon May 6 08:20:39 2024 +0000

    iommu/amd: Enable Guest Translation after reading IOMMU feature register
    
    [ Upstream commit de111f6b4f6a3010020825d22a068f416bc29c95 ]
    
    Commit 8e0179733172 ("iommu/amd: Enable Guest Translation before
    registering devices") moved IOMMU Guest Translation (GT) enablement to
    early init path. It does feature check based on Global EFR value (got from
    ACPI IVRS table). Later it adjusts EFR value based on IOMMU feature
    register (late_iommu_features_init()).
    
    It seems in some systems BIOS doesn't set gloabl EFR value properly.
    This is causing mismatch. Hence move IOMMU GT enablement after
    late_iommu_features_init() so that it does check based on IOMMU EFR
    value.
    
    Fixes: 8e0179733172 ("iommu/amd: Enable Guest Translation before registering devices")
    Reported-by: Klara Modin <klarasmodin@xxxxxxxxx>
    Closes: https://lore.kernel.org/linux-iommu/333e6eb6-361c-4afb-8107-2573324bf689@xxxxxxxxx/
    Signed-off-by: Vasant Hegde <vasant.hegde@xxxxxxx>
    Tested-by: Klara Modin <klarasmodin@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240506082039.7575-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 ac6754a85f350..f440ca440d924 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -2097,6 +2097,8 @@ static int __init iommu_init_pci(struct amd_iommu *iommu)
 			amd_iommu_max_glx_val = glxval;
 		else
 			amd_iommu_max_glx_val = min(amd_iommu_max_glx_val, glxval);
+
+		iommu_enable_gt(iommu);
 	}
 
 	if (check_feature(FEATURE_PPR) && alloc_ppr_log(iommu))
@@ -2773,7 +2775,6 @@ 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);
@@ -2830,7 +2831,6 @@ static void early_enable_iommus(void)
 			iommu_disable_irtcachedis(iommu);
 			iommu_enable_command_buffer(iommu);
 			iommu_enable_event_buffer(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