2024-04-19 12:01:51

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [PATCH v13 16/26] KVM: SEV: Support SEV-SNP AP Creation NAE event

On Thu, Apr 18, 2024 at 9:45 PM Michael Roth <[email protected]> wrote:
> * the VMSA will be NULL if this vCPU is the destination for intrahost
> * migration, and will be copied later.
> */
> - if (svm->sev_es.vmsa)
> + if (!svm->sev_es.snp_has_guest_vmsa)
> svm->vmcb->control.vmsa_pa = __pa(svm->sev_es.vmsa);
>
> /* Can't intercept CR register access, HV can't modify CR registers */

This needs to be svm->sev_es.vmsa && ... (see existing comment above the "if").

Paolo