Re: [PATCH 6.12 111/181] KVM: SVM: Add support to initialize SEV/SNP functionality in KVM
Sean Christopherson <[email protected]>
| Newsgroups | dev.linux.lists.patches,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 19, 2026, Jinpu Wang wrote: > Hi Harshit, > > On Wed, Aug 19, 2026 at 9:12 AM Harshit Mogalapalli > <[email protected]> wrote: ... > > > diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c > > > index 6cec696461da2..bd0344bacaf1e 100644 > > > --- a/arch/x86/kvm/svm/sev.c > > > +++ b/arch/x86/kvm/svm/sev.c > > > @@ -2972,6 +2972,7 @@ void __init sev_set_cpu_caps(void) > > > void __init sev_hardware_setup(void) > > > { > > > unsigned int eax, ebx, ecx, edx, sev_asid_count, sev_es_asid_count; > > > + struct sev_platform_init_args init_args = {0}; > > > bool sev_snp_supported = false; > > > bool sev_es_supported = false; > > > bool sev_supported = false; > > > @@ -3088,6 +3089,15 @@ void __init sev_hardware_setup(void) > > > sev_supported_vmsa_features = 0; > > > if (sev_es_debug_swap_enabled) > > > sev_supported_vmsa_features |= SVM_SEV_FEAT_DEBUG_SWAP; > > > + > > > + if (!sev_enabled) > > > + return; > > > + > > > + /* > > > + * Do both SNP and SEV initialization at KVM module load. > > > + */ > > > + init_args.probe = true; > > > + sev_platform_init(&init_args); > > > } ... > That looks like the case, we only use kvm as module, didn't hit the issue. > > The relevant upstream commits are: > > > > 435b344a7042 ("crypto: ccp: Add external API interface for PSP module > > initialization") > > 44e70718df4f ("KVM: SVM: Ensure PSP module is initialized if KVM module > > is built-in") > > 409f45387c93 ("x86/sev: Fix broken SNP support with KVM module built-in") > > > > > > https://lore.kernel.org/stable/[email protected]/ > > > > > > Could the KVM maintainers confirm whether 6.12.y needs this full series? Yes, we should also backport the above fixes to 6.12.y. > > Probably could be done after this cycle, but still noting it here. Yes, sadly this patch is needed to make SNP usable for *any* configuration, due to bb1c84647025 ("crypto: ccp - Move SEV/SNP Platform initialization to KVM") already being in 6.12.