Messages in this thread | | | From | Vitaly Kuznetsov <> | 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 |
| |
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
| |