[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f358c9b92095e628dbccd7af2f084d7c07206962.camel@redhat.com>
Date: Mon, 05 Aug 2024 14:16:44 +0300
From: mlevitsk@...hat.com
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Vitaly Kuznetsov
<vkuznets@...hat.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Hou Wenlong <houwenlong.hwl@...group.com>, Kechen Lu <kechenl@...dia.com>,
Oliver Upton <oliver.upton@...ux.dev>, Binbin Wu
<binbin.wu@...ux.intel.com>, Yang Weijiang <weijiang.yang@...el.com>,
Robert Hoo <robert.hoo.linux@...il.com>
Subject: Re: [PATCH v2 40/49] KVM: x86: Initialize guest cpu_caps based on
KVM support
У пн, 2024-07-29 у 08:34 -0700, Sean Christopherson пише:
> > On Wed, Jul 24, 2024, Maxim Levitsky wrote:
> > > > On Mon, 2024-07-08 at 17:10 -0700, Sean Christopherson wrote:
> > > > > > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> > > > > > index 0e64a6332052..dbc3f6ce9203 100644
> > > > > > --- a/arch/x86/kvm/cpuid.c
> > > > > > +++ b/arch/x86/kvm/cpuid.c
> > > > > > @@ -448,7 +448,7 @@ void kvm_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
> > > > > > if (!entry)
> > > > > > continue;
> > > > > >
> > > > > > - cpuid_func_emulated(&emulated, cpuid.function);
> > > > > > + cpuid_func_emulated(&emulated, cpuid.function, false);
> > > > > >
> > > > > > /*
> > > > > > * A vCPU has a feature if it's supported by KVM and is enabled
> > > > > > @@ -1034,7 +1034,8 @@ static struct kvm_cpuid_entry2 *do_host_cpuid(struct kvm_cpuid_array *array,
> > > > > > return entry;
> > > > > > }
> > > > > >
> > > > > > -static int cpuid_func_emulated(struct kvm_cpuid_entry2 *entry, u32 func)
> > > > > > +static int cpuid_func_emulated(struct kvm_cpuid_entry2 *entry, u32 func,
> > > > > > + bool only_advertised)
> > > >
> > > > I'll say, lets call this boolean, 'include_partially_emulated',
> > > > (basically features that kvm emulates but only partially,
> > > > and thus doesn't advertise, aka mwait)
> > > >
> > > > and then it doesn't look that bad, assuming that comes with a comment.
> >
> > Works for me. I was trying to figure out a way to say "emulated_on_ud", but I
> > can't get the polarity right, at least not without ridiculous verbosity. E.g.
> > include_not_emulated_on_ud is awful.
> >
Thanks,
Best regards,
Maxim Levitsky
Powered by blists - more mailing lists