llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Tom Rix <trix@redhat.com>,
	kvm@vger.kernel.org, llvm@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH 2/2] KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n
Date: Fri, 10 Feb 2023 10:55:19 +0100	[thread overview]
Message-ID: <875yc97sl4.fsf@redhat.com> (raw)
In-Reply-To: <Y+WaN8wW1EOvPbXe@google.com>

Sean Christopherson <seanjc@google.com> writes:

> On Thu, Feb 09, 2023, Paolo Bonzini wrote:
>> On 2/9/23 14:13, Vitaly Kuznetsov wrote:
>> > > +static __always_inline bool is_evmcs_enabled(void)
>> > > +{
>> > > +	return static_branch_unlikely(&enable_evmcs);
>> > > +}
>> > I have a suggestion. While 'is_evmcs_enabled' name is certainly not
>> > worse than 'enable_evmcs', it may still be confusing as it's not clear
>> > which eVMCS is meant: are we running a guest using eVMCS or using eVMCS
>> > ourselves? So what if we rename this to a very explicit 'is_kvm_on_hyperv()'
>> > and hide the implementation details (i.e. 'evmcs') inside?
>> 
>> I prefer keeping eVMCS in the name,
>
> +1, IIUC KVM can run on Hyper-V without eVMCS being enabled.
>
>> but I agree a better name could be something like kvm_uses_evmcs()?
>
> kvm_is_using_evmcs()?
>

Sounds good to me!

-- 
Vitaly


      reply	other threads:[~2023-02-10  9:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 20:54 [PATCH 0/2] KVM: VMX: Stub out enable_evmcs static key Sean Christopherson
2023-02-08 20:54 ` [PATCH 1/2] KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.c Sean Christopherson
2023-02-09 13:08   ` Vitaly Kuznetsov
2023-02-08 20:54 ` [PATCH 2/2] KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n Sean Christopherson
2023-02-09 13:13   ` Vitaly Kuznetsov
2023-02-09 13:56     ` Paolo Bonzini
2023-02-10  1:13       ` Sean Christopherson
2023-02-10  9:55         ` Vitaly Kuznetsov [this message]

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=875yc97sl4.fsf@redhat.com \
    --to=vkuznets@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=trix@redhat.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;
as well as URLs for NNTP newsgroup(s).