Re: [PATCH v3 13/15] KVM: SEV: define VM types for SEV and SEV-ES

From: Paolo Bonzini
Date: Tue Mar 05 2024 - 08:34:55 EST


On 3/4/24 16:32, Xu Yilun wrote:
@@ -247,6 +247,9 @@ static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp)
if (kvm->created_vcpus)
return -EINVAL;
+ if (kvm->arch.vm_type != KVM_X86_DEFAULT_VM)
^

IIUC it should be KVM_X86_SEV_VM?

No, this is the legacy ioctl that only works with default-type VMs.

Paolo