--- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -168,6 +168,9 @@ static int sev_guest_init(struct kvm *kv struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info; int asid, ret; + if (kvm->created_vcpus) + return -EINVAL; + ret = -EBUSY; if (unlikely(sev->active)) return ret;