[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18cae1ff-e6c1-46b6-aa60-53bd21bd7d1f@amd.com>
Date: Thu, 17 Jul 2025 11:26:32 +0530
From: Vasant Hegde <vasant.hegde@....com>
To: "Kalra, Ashish" <ashish.kalra@....com>, joro@...tes.org,
suravee.suthikulpanit@....com, thomas.lendacky@....com,
Sairaj.ArunKodilkar@....com, herbert@...dor.apana.org.au
Cc: seanjc@...gle.com, pbonzini@...hat.com, will@...nel.org,
robin.murphy@....com, john.allen@....com, davem@...emloft.net, bp@...en8.de,
michael.roth@....com, iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH v3 3/4] crypto: ccp: Skip SNP INIT for kdump boot
Hi Ashish,
On 7/17/2025 3:33 AM, Kalra, Ashish wrote:
> 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@....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;
Ah Ok. thanks!
>
> 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.
Sure thanks!
-Vasant
Powered by blists - more mailing lists