From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Jim Mattson <jmattson@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
kvm list <kvm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: VMX: fix crash cleanup when KVM wasn't used
Date: Mon, 24 Aug 2020 17:09:20 -0700 [thread overview]
Message-ID: <20200825000920.GB15046@sjchrist-ice> (raw)
In-Reply-To: <CALMp9eS1HusEZvzLShuuuxQnReKgTtunsKLoy+2GMVJAaTrZ7A@mail.gmail.com>
On Mon, Aug 24, 2020 at 03:45:26PM -0700, Jim Mattson wrote:
> On Mon, Aug 24, 2020 at 11:57 AM Jim Mattson <jmattson@google.com> wrote:
> >
> > On Fri, Aug 21, 2020 at 8:40 PM Sean Christopherson
> > <sean.j.christopherson@intel.com> wrote:
> > > I agree the code is a mess (kvm_init() and kvm_exit() included), but I'm
> > > pretty sure hardware_disable_nolock() is guaranteed to be a nop as it's
> > > impossible for kvm_usage_count to be non-zero if vmx_init() hasn't
> > > finished.
> >
> > Unless I'm missing something, there's no check for a non-zero
> > kvm_usage_count on this path. There is such a check in
> > hardware_disable_all_nolock(), but not in hardware_disable_nolock().
>
> However, cpus_hardware_enabled shouldn't have any bits set, so
> everything's fine. Nothing to see here, after all.
Ugh, I forgot that hardware_disable_all_nolock() does a BUG_ON() instead of
bailing on !kvm_usage_count.
next prev parent reply other threads:[~2020-08-25 0:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 8:13 [PATCH] KVM: VMX: fix crash cleanup when KVM wasn't used Vitaly Kuznetsov
2020-04-01 15:18 ` Sean Christopherson
2020-04-07 12:35 ` Paolo Bonzini
2020-04-09 1:22 ` Baoquan He
2020-08-20 20:08 ` Jim Mattson
2020-08-22 3:40 ` Sean Christopherson
2020-08-24 18:57 ` Jim Mattson
2020-08-24 22:45 ` Jim Mattson
2020-08-25 0:09 ` Sean Christopherson [this message]
2020-09-01 10:36 ` Vitaly Kuznetsov
2020-09-02 15:18 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200825000920.GB15046@sjchrist-ice \
--to=sean.j.christopherson@intel.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox