Re: [PATCH 3/4] kvm: svm: Support guest-provided VMSA for launching

Jörg Rödel <[email protected]> Tue, 23 Jun 2026 13:36:52 +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:48:20PM -0500, Tom Lendacky wrote:
> On 6/11/26 07:35, Jörg Rödel wrote:
> > +static int snp_init_guest_vmsa(struct kvm_vcpu *vcpu, gpa_t vmsa_gpa)
> > +{
> > +	/* Only one initial guest VMSA can exist (per IGVM) - so it belongs to the BSP */
> 
> Maybe expand this comment to indicate that none of the other vCPU VMSAs
> are created by KVM, that the guest is responsible for creating them for
> the first time.

Okay, updated the comment.

> Which reminds me that you will need to provide the GHCB APIC ID List NAE
> event support. If OVMF was ever to be built as an IGVM file, then
> without that GHCB event support it will perform a broadcast INIT-SIPI
> for the first AP startup, which will fail because no VMSAs will have
> been created. If OVMF sees that the HV has advertised the event, then it
> will create all the VMSAs itself and use the GHCB AP Create NAE event
> for initial startup of the APs.

Right. Currently the GHCB APIC ID List NAE patch is part of the KVM planes
patch-set, so whichever patch-set is accepted first should include it. I will
add this patch here as well when posting v2.

> > +	gpa_t initial_vmsa_gpa; /* Optinal GPA of BSP VMSA - SEV-SNP only */
> 
> s/Optinal/Optional/
> 
> Should it be called bsp_vmsa_gpa ?

Yes, that is better, changed it.

-Joerg