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

From: Jörg Rödel

Date: Tue Jun 23 2026 - 07:37:09 EST


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