[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ecdc20d5-e5c2-cab7-2973-39c811cac42c@redhat.com>
Date: Fri, 4 Nov 2016 15:53:02 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Borislav Petkov <bp@...en8.de>, He Chen <he.chen@...ux.intel.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, x86@...nel.org,
Radim Krčmář <rkrcmar@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
Luwei Kang <luwei.kang@...el.com>,
Piotr Luc <Piotr.Luc@...el.com>
Subject: Re: [PATCH v3] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS
features to kvm guest
On 04/11/2016 11:52, Borislav Petkov wrote:
> Please CC me on your future submissions, thanks.
>
> On Fri, Nov 04, 2016 at 03:07:19PM +0800, He Chen wrote:
>> The spec can be found in Intel Software Developer Manual or in
>> Instruction Set Extensions Programming Reference.
>
> This commit message is completely useless. Write commit messages in
> the way as if you're explaining to another person *why* this change is
> needed and that other person doesn't have an idea what you're doing.
>
>> Signed-off-by: Luwei Kang <luwei.kang@...el.com>
>> Signed-off-by: He Chen <he.chen@...ux.intel.com>
>
> This SOB chain means what exactly?
>
>> ---
>> Changes in v3:
>> * add a helper in scattered.c to get scattered leaf.
>
> The modification to scattered et al without the kvm use should be a
> separate patch.
With no usage? Sounds like a good use of Acked-by. :)
>> +u32 get_scattered_cpuid_leaf(unsigned int level, unsigned int sub_leaf,
>> + enum cpuid_regs_idx reg)
>
> Align arguments on the opening brace.
They are aligned.
Paolo
>> +{
>> + u32 cpuid_val = 0;
>> + const struct cpuid_bit *cb;
>
>
> Please sort function local variables declaration in a reverse christmas
> tree order:
>
> <type> longest_variable_name;
> <type> shorter_var_name;
> <type> even_shorter;
> <type> i;
>
>> +
>> + for (cb = cpuid_bits; cb->feature; cb++) {
>> +
>> + if (level > cb->level)
>> + continue;
>> +
>> + if (level < cb->level)
>> + break;
>> +
>> + if (reg == cb->reg && sub_leaf == cb->sub_leaf) {
>> + if (cpu_has(&boot_cpu_data, cb->feature))
>> + cpuid_val |= BIT(cb->bit);
>> + }
>> + }
>> +
>> + return cpuid_val;
>> +}
>
Powered by blists - more mailing lists