Re: [PATCH 2/4] kvm: svm: Defer VMSA allocation to LAUNCH_FINISH stage
Jörg Rödel <[email protected]> Tue, 23 Jun 2026 13:26:43 +0200
| Newsgroups | dev.linux.lists.coconut-svsm,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jun 16, 2026 at 04:33:56PM -0500, Tom Lendacky wrote: > On 6/11/26 07:35, Jörg Rödel wrote: > > @@ -1209,6 +1215,8 @@ static int __sev_launch_update_vmsa(struct kvm *kvm, struct kvm_vcpu *vcpu, > > if (ret) > > return ret; > > > > + vmsa_ref = sev_es_vmsa_ref(vcpu); > > Maybe just a comment above this that indicates if the sync was > successful then a VMSA has been allocated and only now can you get a > pointer to it ? Makes sense, added a comment here and to __snp_launch_update_vmsa(). > > - if (!is_sev_es_guest(vcpu)) > > - return 0; > > If you leave this here, it might make it easier to add things in the > future should something be needed. Just tack them on at the bottom. Not > necessary, though. Right, that is better, changed it back. -Joerg