]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "iommu/amd: Skip enabling command/event buffers for kdump"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2026 10:48:34 +0000 (11:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Jan 2026 14:19:27 +0000 (15:19 +0100)
This reverts commit f33890f95140660923003ba1e2f114dee20e691b which is
commit 9be15fbfc6c5c89c22cf6e209f66ea43ee0e58bb upstream.

This causes problems in older kernel trees as SNP host kdump is not
supported in them, so drop it from the stable branches.

Reported-by: Ashish Kalra <ashish.kalra@amd.com>
Link: https://lore.kernel.org/r/dacdff7f-0606-4ed5-b056-2de564404d51@amd.com
Cc: Vasant Hegde <vasant.hegde@amd.com>
Cc: Sairaj Kodilkar <sarunkod@amd.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd/init.c

index 06fb4e577bc7710330f1890b94376536c15ef711..9cb53e384247e93e79d35e5d00f78d01a42fbb51 100644 (file)
@@ -805,16 +805,11 @@ static void iommu_enable_command_buffer(struct amd_iommu *iommu)
 
        BUG_ON(iommu->cmd_buf == NULL);
 
-       if (!is_kdump_kernel()) {
-               /*
-                * Command buffer is re-used for kdump kernel and setting
-                * of MMIO register is not required.
-                */
-               entry = iommu_virt_to_phys(iommu->cmd_buf);
-               entry |= MMIO_CMD_SIZE_512;
-               memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
-                           &entry, sizeof(entry));
-       }
+       entry = iommu_virt_to_phys(iommu->cmd_buf);
+       entry |= MMIO_CMD_SIZE_512;
+
+       memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
+                   &entry, sizeof(entry));
 
        amd_iommu_reset_cmd_buffer(iommu);
 }
@@ -863,15 +858,10 @@ static void iommu_enable_event_buffer(struct amd_iommu *iommu)
 
        BUG_ON(iommu->evt_buf == NULL);
 
-       if (!is_kdump_kernel()) {
-               /*
-                * Event buffer is re-used for kdump kernel and setting
-                * of MMIO register is not required.
-                */
-               entry = iommu_virt_to_phys(iommu->evt_buf) | EVT_LEN_MASK;
-               memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET,
-                           &entry, sizeof(entry));
-       }
+       entry = iommu_virt_to_phys(iommu->evt_buf) | EVT_LEN_MASK;
+
+       memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET,
+                   &entry, sizeof(entry));
 
        /* set head and tail to zero manually */
        writel(0x00, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);