Skip to content

iommu/amd: Fix device table setup in kdump kernels

Matt Fleming linux-iommu lkml stable 2 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesApplied
  2. v12 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Explain the split base-register write and DMA32 requirement in patch 2.
- Limit patch 2's stable backports to 6.18.x and later, which contain 38e5f33ee359.
- Add Ashish Kalra's and Ankit Soni's Reviewed-by tags to both patches, and Vasant Hegde's Reviewed-by tag to patch 1.
- No code changes from v1.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2iommu/amd: Program device table when kdump reuse failsdrivers/iommu/amd/init.c+7 -10 replies
2/2iommu/amd: Don't allocate kdump device table from DMA32drivers/iommu/amd/init.c+13 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAshish KalraAnkit SoniVasant Hegde
1/2R-b R-b R-b
2/2R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/2] iommu/amd: Fix device table setup in kdump kernels

From: Matt Fleming <[email protected]>

An AMD kdump kernel booted with crashkernel=512M,high and crashkernel=0,low fails to allocate its device table because there's no memory below 4G. IOMMU init fails and, on our systems with an Intel E810 NIC, the ice driver's TX queues time out, so the dump never gets sent.

Since commit 38e5f33ee359 ("iommu/amd: Reuse device table for kdump"), a kdump kernel normally reuses the previous kernel's table. Patch 1 programs the new table if reuse fails. Patch 2 drops GFP_DMA32 for kdump kernels. Normal kernels still allocate below 4G, because that's what the kdump kernel checks before reusing the table.

On an AMD EPYC system with an E810 NIC, the kdump kernel without these patches failed the order-9 GFP_DMA32 allocation and its TX queues timed out. With these patches, the kdump kernel reused the old device table and the dump was written over the network. The reuse-failure path in patch 1 was found by code inspection, not exercised by this test.

---
Changes in v2:
- Explain the split base-register write and DMA32 requirement in patch 2.
- Limit patch 2's stable backports to 6.18.x and later, which contain 38e5f33ee359.
- Add Ashish Kalra's and Ankit Soni's Reviewed-by tags to both patches, and Vasant Hegde's Reviewed-by tag to patch 1.
- No code changes from v1.

v1: https://lore.kernel.org/r/[email protected]

Matt Fleming (2):
iommu/amd: Program device table when kdump reuse fails iommu/amd: Don't allocate kdump device table from DMA32

 drivers/iommu/amd/init.c | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0