Re: [PATCH 26/61] KVM: x86: Introduce cpuid_entry_{get,has}() accessors

From: Sean Christopherson
Date: Fri Feb 21 2020 - 11:29:18 EST


On Fri, Feb 21, 2020 at 04:57:52PM +0100, Vitaly Kuznetsov wrote:
> Sean Christopherson <sean.j.christopherson@xxxxxxxxx> writes:
>
> > @@ -119,6 +113,40 @@ static __always_inline u32 *guest_cpuid_get_register(struct kvm_vcpu *vcpu, unsi
> > }
> > }
> >
> > +static __always_inline u32 *cpuid_entry_get_reg(struct kvm_cpuid_entry2 *entry,
> > + unsigned x86_feature)
>
> It is just me who dislikes bare 'unsigned'?

I don't like it either. I also don't like get yelled at by checkpatch.

I used "unsigned" here and throughout to be consistent with the existing
guest_cpuid_*() and x86_feature_cpuid() helpers in cpuid.h.

I will happily add a patch to change those to use "unsigned int" and
then also use "unsigned int" for the cpuid_entry_*() code.