This is a note to let you know that I've just added the patch titled iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled to the 5.11-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-don-t-call-early_amd_iommu_init-when-amd-iommu-is-disabled.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 9f81ca8d1fd68f5697c201f26632ed622e9e462f Mon Sep 17 00:00:00 2001 From: Joerg Roedel <jroedel@xxxxxxx> Date: Wed, 17 Mar 2021 10:10:36 +0100 Subject: iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled From: Joerg Roedel <jroedel@xxxxxxx> commit 9f81ca8d1fd68f5697c201f26632ed622e9e462f upstream. Don't even try to initialize the AMD IOMMU hardware when amd_iommu=off has been passed on the kernel command line. References: https://bugzilla.kernel.org/show_bug.cgi?id=212133 References: https://bugzilla.suse.com/show_bug.cgi?id=1183132 Cc: stable@xxxxxxxxxxxxxxx # v5.11 Signed-off-by: Joerg Roedel <jroedel@xxxxxxx> Link: https://lore.kernel.org/r/20210317091037.31374-3-joro@xxxxxxxxxx Acked-by: Huang Rui <ray.huang@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/iommu/amd/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -2917,12 +2917,12 @@ static int __init state_next(void) } break; case IOMMU_IVRS_DETECTED: - ret = early_amd_iommu_init(); - init_state = ret ? IOMMU_INIT_ERROR : IOMMU_ACPI_FINISHED; - if (init_state == IOMMU_ACPI_FINISHED && amd_iommu_disabled) { - pr_info("AMD IOMMU disabled\n"); + if (amd_iommu_disabled) { init_state = IOMMU_CMDLINE_DISABLED; ret = -EINVAL; + } else { + ret = early_amd_iommu_init(); + init_state = ret ? IOMMU_INIT_ERROR : IOMMU_ACPI_FINISHED; } break; case IOMMU_ACPI_FINISHED: Patches currently in stable-queue which might be from jroedel@xxxxxxx are queue-5.11/iommu-amd-move-stoney-ridge-check-to-detect_ivrs.patch queue-5.11/iommu-amd-don-t-call-early_amd_iommu_init-when-amd-iommu-is-disabled.patch queue-5.11/iommu-amd-keep-track-of-amd_iommu_irq_remap-state.patch