Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4666997pxv; Tue, 6 Jul 2021 06:30:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY4Q+QOv3Vadv586EMZuY5BYfLI2TclhZGFpJ0zPbcQO2J7gpBBLsgmTqc0YGaoYxt+qAf X-Received: by 2002:a17:906:f145:: with SMTP id gw5mr667075ejb.249.1625578254952; Tue, 06 Jul 2021 06:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625578254; cv=none; d=google.com; s=arc-20160816; b=ramAgYAVIbm6oT8b5dy+asvVtAJoZWm6+EdiG2JCHK1/bG17t+ngaJ+E8wuc2LWijC sXnfDA1hlSWOxUWVEVv6ec8OOMTjtprkfv6Hn2s1WqdO6/tswXWwoNRKfj+xRQAYSAdC bjgTWA3Tvor1WFuc/FfKQjObEyAPxEBcjk/RK3yTs2SiuLyzF+iGcZJEVR8gGxgktBsL IIIXbzrM6Apgzb0zSZnoeZDpHQfs1QvolT8gWWwSyYzlDOo2moeZeTK83iFIrceM2+hG MGCdlL9AkjzZep/Eft0l8zdpGvabuiB+5DIys7mTZKrUcIpCDb9q+Tagig0xlpzPcZzK F+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=b6GKbKb42lb4IhAfyCCRv2xGL8eyeUScTryxYmNKLo0=; b=RXQudohxWVn1s5XWQKYSpsxKM2Zu2NdSAjYWyTpqTmKY7YQB7fL7/lYDLToKJ1xyAa 9cjaJr86LlxWZ2ZdZsrYfv8FpFSOFPzp4t7hRuJHYpUD2AJ58R+X4ndkqcNzFLpGExT3 5/CAY1Cn9q2TVeSnOAqaGiX4vXY9LsfQX0zIc6LDbk09ynNUAI3RJoOP00SM5YfqtkJY jaDZvxDUPgMb0XmYd7vjNmAAbK0Xme5unoMIQw1MNV6U9c1xJFx9iXaDpAVeEWlx6hY1 NyAliCvQvjvpWlJvvqg59p7Ex8cvuOHksMjzXyQ5ER4DG+6qBFkJKuagMe9tALhjAEzc jTOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="S0z4/HUU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si99296edy.327.2021.07.06.06.30.31; Tue, 06 Jul 2021 06:30:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="S0z4/HUU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232029AbhGFN3Q (ORCPT + 99 others); Tue, 6 Jul 2021 09:29:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57771 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231487AbhGFN3P (ORCPT ); Tue, 6 Jul 2021 09:29:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625577997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b6GKbKb42lb4IhAfyCCRv2xGL8eyeUScTryxYmNKLo0=; b=S0z4/HUUfpMbLDuoHxkcwcDteEFT+G+TQwVYO7ZBrbWmahmnt0r5vqYtR75aD/FBSdby/n tcQRPVKyvd60U5p7gliZPcIbNJNofx2N7ftT4VUXXQVZqrs9Pm9JW1kn16rxNV65sm5/m+ jnYBx/FMFJkCJw2a3Sn3RfH2lOP1tP0= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-32-nthqqYHLNReWmJ6gOix4OQ-1; Tue, 06 Jul 2021 09:26:35 -0400 X-MC-Unique: nthqqYHLNReWmJ6gOix4OQ-1 Received: by mail-ed1-f70.google.com with SMTP id p13-20020a05640210cdb029039560ff6f46so10801387edu.17 for ; Tue, 06 Jul 2021 06:26:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=b6GKbKb42lb4IhAfyCCRv2xGL8eyeUScTryxYmNKLo0=; b=jz8Db4kLQFPHnFcEOU/8ZHHc33QrwP8x6COPJCtP7g+/8dGiufV5gVjbz4dpYycIgB s2okpjOO2L9rwpYWnDl58GDbo0mumsea5WYHMama2mmJCdzjxoZXY0vBYk7+L9RwwBtz dXfMmDEmmJS8dFmyb7fuEHa7nCVSTmcCKQbRiCnZs7b0jNjdo2sIxfjHfpXeuE7CmNWW xy0/PkyuPKv/4Udr61lr9Pl0Y7o48m0o9Mp9O74dxSpY95PE/T6vc7D6XWCkgbZqzQz3 jDpVgVi4ytbyE6TfA+OfZr+U5MBKNIDM8l3e4lNgd2/0ugHd+H1G3bkyIa0OMobGPQR/ 455g== X-Gm-Message-State: AOAM533cDy6kV9HZFPCTX/zbwNfXdkL2P9WTd0kBjdrxKyaNdHvyIzXc E1yADb4JtdZgNwdqfsjxdtPH/Ku6OwDG1e9YCE4LKTQSO0vBydQGTJu00sZ+70keBsrAfjtnZBZ 7paEQoMODXN+pemVbKXwZKXf3 X-Received: by 2002:a05:6402:b07:: with SMTP id bm7mr16352202edb.345.1625577994607; Tue, 06 Jul 2021 06:26:34 -0700 (PDT) X-Received: by 2002:a05:6402:b07:: with SMTP id bm7mr16352179edb.345.1625577994479; Tue, 06 Jul 2021 06:26:34 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z17sm5713482ejj.36.2021.07.06.06.26.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jul 2021 06:26:33 -0700 (PDT) Subject: Re: [RFC PATCH v2 13/69] KVM: Enable hardware before doing arch VM initialization To: isaku.yamahata@intel.com, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , erdemaktas@google.com, Connor Kuehl , Sean Christopherson , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: isaku.yamahata@gmail.com, Sean Christopherson References: <66062b64b2b61cd985e280418a7c4318104bc541.1625186503.git.isaku.yamahata@intel.com> From: Paolo Bonzini Message-ID: <3e9c9907-09ad-7c9f-fc71-df4eaa88bc78@redhat.com> Date: Tue, 6 Jul 2021 15:26:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <66062b64b2b61cd985e280418a7c4318104bc541.1625186503.git.isaku.yamahata@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/21 00:04, isaku.yamahata@intel.com wrote: > This also provides consistent ordering between kvm_create_vm() and > kvm_destroy_vm() with respect to calling kvm_arch_destroy_vm() and > hardware_disable_all(). > > Signed-off-by: Sean Christopherson > Signed-off-by: Isaku Yamahata > --- > virt/kvm/kvm_main.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 9e52fe999c92..751d1f6890b0 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -923,7 +923,7 @@ static struct kvm *kvm_create_vm(unsigned long type) > struct kvm_memslots *slots = kvm_alloc_memslots(); > > if (!slots) > - goto out_err_no_arch_destroy_vm; > + goto out_err_no_disable; > /* Generations must be different for each address space. */ > slots->generation = i; > rcu_assign_pointer(kvm->memslots[i], slots); > @@ -933,19 +933,19 @@ static struct kvm *kvm_create_vm(unsigned long typ Reviewed-by: Paolo Bonzini