lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2d6b64ae-eca7-ae1d-1695-4c2697a60616@amd.com>
Date: Fri, 9 May 2025 12:57:39 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: "Kalra, Ashish" <ashish.kalra@....com>,
 "Paluri, PavanKumar" <papaluri@....com>, seanjc@...gle.com,
 pbonzini@...hat.com, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, shuah@...nel.org, prsampat@....com
Cc: pgonda@...gle.com, nikunj@....com, pankaj.gupta@....com,
 michael.roth@....com, sraithal@....com, linux-kernel@...r.kernel.org,
 x86@...nel.org, kvm@...r.kernel.org, linux-kselftest@...r.kernel.org,
 linux-coco@...ts.linux.dev,
 "Paluri, PavanKumar (Pavan Kumar)" <pavankumar.paluri@....com>
Subject: Re: [PATCH] KVM: SEV: Disable SEV-SNP support on initialization
 failure

On 5/9/25 12:52, Kalra, Ashish wrote:
> 
> On 5/9/2025 12:01 PM, Paluri, PavanKumar wrote:
>>
>>
>> On 5/8/2025 5:52 PM, Ashish Kalra wrote:
>>> From: Ashish Kalra <ashish.kalra@....com>
>>>
>>> During platform init, SNP initialization may fail for several reasons,
>>> such as firmware command failures and incompatible versions. However,
>>> the KVM capability may continue to advertise support for it.
>>>
>>> The platform may have SNP enabled but if SNP_INIT fails then SNP is
>>> not supported by KVM.
>>>
>>> During KVM module initialization query the SNP platform status to obtain
>>> the SNP initialization state and use it as an additional condition to
>>> determine support for SEV-SNP.
>>>
>>> Co-developed-by: Sean Christopherson <seanjc@...gle.com>
>>> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
>>> Co-developed-by: Pratik R. Sampat <prsampat@....com>
>>> Signed-off-by: Pratik R. Sampat <prsampat@....com>
>>> Signed-off-by: Ashish Kalra <ashish.kalra@....com>
>>> ---
>>>  arch/x86/kvm/svm/sev.c | 43 +++++++++++++++++++++++++++++++++---------
>>>  1 file changed, 34 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
>>> index ada53f04158c..a6abdb26f877 100644
>>> --- a/arch/x86/kvm/svm/sev.c
>>> +++ b/arch/x86/kvm/svm/sev.c
>>> @@ -2934,6 +2934,32 @@ void __init sev_set_cpu_caps(void)
>>>  	}
>>>  }
>>>  
>>> +static bool sev_is_snp_initialized(void)
>>
>> s/sev_is_snp_initialized/is_sev_snp_initalized looks better.
>>
> 
> Actually the convention is sev_is_xx(). 

Except that it is a static, so doesn't need to start with sev_. See
is_pfn_range_shared(), max_level_for_order(), etc. in the same file.

Thanks,
Tom

>  
>>> +{

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ