From: "Kalra, Ashish" <ashish.kalra@amd.com>
To: Vasant Hegde <vasant.hegde@amd.com>,
joro@8bytes.org, suravee.suthikulpanit@amd.com,
thomas.lendacky@amd.com, Sairaj.ArunKodilkar@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,
bp@alien8.de, 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 v3 3/4] crypto: ccp: Skip SNP INIT for kdump boot
Date: Wed, 16 Jul 2025 17:03:06 -0500 [thread overview]
Message-ID: <d9638984-0d75-4887-8378-97807f6af2bd@amd.com> (raw)
In-Reply-To: <d7b3e0d1-4a93-4245-b09a-701bb14553d4@amd.com>
Hello Vasant,
On 7/16/2025 4:20 AM, Vasant Hegde wrote:
>
>
> On 7/16/2025 12:57 AM, Ashish Kalra wrote:
>> From: Ashish Kalra <ashish.kalra@amd.com>
>>
>> If SNP is enabled and initialized in the previous kernel then SNP is
>> already initialized for kdump boot and attempting SNP INIT again
>> during kdump boot causes SNP INIT failure and eventually leads to
>> IOMMU failures.
>>
>> Skip SNP INIT if doing kdump boot.
>
> Just double checking, do we need check for snp_rmptable_init()?
>
Do you mean adding this check in snp_rmptable_init() ?
We already have a check there for kexec boot:
snp_rmptable_init()
{
...
...
/*
* Check if SEV-SNP is already enabled, this can happen in case of
* kexec boot.
*/
rdmsrq(MSR_AMD64_SYSCFG, val);
if (val & MSR_AMD64_SYSCFG_SNP_EN)
goto skip_enable;
And we still have to map the RMP table in the kernel as SNP is still enabled
and initialized in this case for kdump boot, so that is still required as
part of snp_rmptable_init().
Additionally, for this patch i also have to skip SEV INIT similar to what we
are doing for SNP INIT as we get SEV INIT failure warnings as SEV is also
initialized during this kdump boot similar to SNP.
So will be moving this check and skip to _sev_platform_init_locked() to handle
both SEV and SNP INIT cases.
Thanks,
Ashish
next prev parent reply other threads:[~2025-07-16 22:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 19:26 [PATCH v3 0/4] iommu/amd: Fix host kdump support for SNP Ashish Kalra
2025-07-15 19:26 ` [PATCH v3 1/4] iommu/amd: Add support to remap/unmap IOMMU buffers for kdump Ashish Kalra
2025-07-16 9:19 ` Vasant Hegde
2025-07-16 21:55 ` Kalra, Ashish
2025-07-17 7:05 ` Vasant Hegde
2025-07-17 7:16 ` Kalra, Ashish
2025-07-15 19:27 ` [PATCH v3 2/4] iommu/amd: Reuse device table " Ashish Kalra
2025-07-16 9:42 ` Vasant Hegde
2025-07-16 22:07 ` Kalra, Ashish
2025-07-17 5:38 ` Sairaj Kodilkar
2025-07-17 6:05 ` Vasant Hegde
2025-07-17 6:51 ` Kalra, Ashish
2025-07-15 19:27 ` [PATCH v3 3/4] crypto: ccp: Skip SNP INIT for kdump boot Ashish Kalra
2025-07-16 9:20 ` Vasant Hegde
2025-07-16 22:03 ` Kalra, Ashish [this message]
2025-07-17 5:56 ` Vasant Hegde
2025-07-15 19:27 ` [PATCH v3 4/4] iommu/amd: Fix host kdump support for SNP Ashish Kalra
2025-07-16 9:46 ` Vasant Hegde
2025-07-16 22:12 ` Kalra, Ashish
2025-07-17 6:22 ` Vasant Hegde
2025-07-17 6:55 ` Kalra, Ashish
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=d9638984-0d75-4887-8378-97807f6af2bd@amd.com \
--to=ashish.kalra@amd.com \
--cc=Sairaj.ArunKodilkar@amd.com \
--cc=bp@alien8.de \
--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=vasant.hegde@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).