]> Gentwo Git Trees - linux/.git/commit
iommu/amd: Reuse device table for kdump
authorAshish Kalra <ashish.kalra@amd.com>
Mon, 25 Aug 2025 21:46:15 +0000 (21:46 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 5 Sep 2025 12:44:32 +0000 (14:44 +0200)
commit38e5f33ee3596f37ee8d1e694073a17590904004
tree5c14c6fbfc52a54f59d0deb6bacaedf9f3a37de4
parentf32fe7cb019861f585b40bff4c3daf237b9af294
iommu/amd: Reuse device table for kdump

After a panic if SNP is enabled in the previous kernel then the kdump
kernel boots with IOMMU SNP enforcement still enabled.

IOMMU device table register is locked and exclusive to the previous
kernel. Attempts to copy old device table from the previous kernel
fails in kdump kernel as hardware ignores writes to the locked device
table base address register as per AMD IOMMU spec Section 2.12.2.1.

This causes the IOMMU driver (OS) and the hardware to reference
different memory locations. As a result, the IOMMU hardware cannot
process the command which results in repeated "Completion-Wait loop
timed out" errors and a second kernel panic: "Kernel panic - not
syncing: timer doesn't work through Interrupt-remapped IO-APIC".

Reuse device table instead of copying device table in case of kdump
boot and remove all copying device table code.

Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Tested-by: Sairaj Kodilkar <sarunkod@amd.com>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Link: https://lore.kernel.org/r/3a31036fb2f7323e6b1a1a1921ac777e9f7bdddc.1756157913.git.ashish.kalra@amd.com
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd/init.c