From: Sairaj Kodilkar <sarunkod@amd.com>
To: Ashish Kalra <Ashish.Kalra@amd.com>, <joro@8bytes.org>,
<suravee.suthikulpanit@amd.com>, <thomas.lendacky@amd.com>,
<Sairaj.ArunKodilkar@amd.com>, <Vasant.Hegde@amd.com>,
<herbert@gondor.apana.org.au>
Cc: <seanjc@google.com>, <pbonzini@redhat.com>, <will@kernel.org>,
<robin.murphy@arm.com>, <john.allen@amd.com>,
<davem@davemloft.net>, <michael.roth@amd.com>,
<iommu@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
<linux-crypto@vger.kernel.org>, <kvm@vger.kernel.org>
Subject: Re: [PATCH v4 1/4] iommu/amd: Add support to remap/unmap IOMMU buffers for kdump
Date: Fri, 25 Jul 2025 15:58:52 +0530 [thread overview]
Message-ID: <4134f54f-9b01-47fc-be40-6829aeae1fcd@amd.com> (raw)
In-Reply-To: <6a48567cd99a0ef915862b3c6590d1415d287870.1753133022.git.ashish.kalra@amd.com>
On 7/22/2025 3:22 AM, Ashish Kalra wrote:
> From: Ashish Kalra <ashish.kalra@amd.com>
>
> After a panic if SNP is enabled in the previous kernel then the kdump
> kernel boots with IOMMU SNP enforcement still enabled.
>
> IOMMU completion wait buffers (CWBs), command buffers and event buffer
> registers remain locked and exclusive to the previous kernel. Attempts
> to allocate and use new buffers in the kdump kernel fail, as hardware
> ignores writes to the locked MMIO registers as per AMD IOMMU spec
> Section 2.12.2.1.
>
> This 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"
>
> The list of MMIO registers locked and which ignore writes after failed
> SNP shutdown are mentioned in the AMD IOMMU specifications below:
>
> Section 2.12.2.1.
> https://docs.amd.com/v/u/en-US/48882_3.10_PUB
>
> Reuse the pages of the previous kernel for completion wait buffers,
> command buffers, event buffers and memremap them during kdump boot
> and essentially work with an already enabled IOMMU configuration and
> re-using the previous kernel’s data structures.
>
> Reusing of command buffers and event buffers is now done for kdump boot
> irrespective of SNP being enabled during kdump.
>
> Re-use of completion wait buffers is only done when SNP is enabled as
> the exclusion base register is used for the completion wait buffer
> (CWB) address only when SNP is enabled.
>
> Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Tested-by: Sairaj Kodilkar <sarunkod@amd.com>
next prev parent reply other threads:[~2025-07-25 10:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 21:52 [PATCH v4 0/4] Add host kdump support for SNP Ashish Kalra
2025-07-21 21:52 ` [PATCH v4 1/4] iommu/amd: Add support to remap/unmap IOMMU buffers for kdump Ashish Kalra
2025-07-24 12:00 ` kernel test robot
2025-07-25 10:28 ` Sairaj Kodilkar [this message]
2025-07-21 21:53 ` [PATCH v4 2/4] iommu/amd: Reuse device table " Ashish Kalra
2025-07-25 10:29 ` Sairaj Kodilkar
2025-07-21 21:53 ` [PATCH v4 3/4] crypto: ccp: Skip SEV and SNP INIT for kdump boot Ashish Kalra
2025-07-25 10:30 ` Sairaj Kodilkar
2025-07-21 21:53 ` [PATCH v4 4/4] iommu/amd: Skip enabling command/event buffers for kdump Ashish Kalra
2025-07-25 10:30 ` Sairaj Kodilkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4134f54f-9b01-47fc-be40-6829aeae1fcd@amd.com \
--to=sarunkod@amd.com \
--cc=Ashish.Kalra@amd.com \
--cc=Sairaj.ArunKodilkar@amd.com \
--cc=Vasant.Hegde@amd.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=iommu@lists.linux.dev \
--cc=john.allen@amd.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=robin.murphy@arm.com \
--cc=seanjc@google.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=thomas.lendacky@amd.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.