Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758206AbcJQH65 (ORCPT ); Mon, 17 Oct 2016 03:58:57 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:35965 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758157AbcJQH6O (ORCPT ); Mon, 17 Oct 2016 03:58:14 -0400 Date: Mon, 17 Oct 2016 09:55:10 +0200 (CEST) From: Thomas Gleixner To: Borislav Petkov cc: Ingo Molnar , peterz@infradead.org, dave.hansen@intel.com, torvalds@linux-foundation.org, piotr.luc@intel.com, luto@kernel.org, brgerst@gmail.com, hpa@zytor.com, linux-kernel@vger.kernel.org, dvlasenk@redhat.com, jpoimboe@redhat.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/urgent] x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features In-Reply-To: <20161016142233.xuqrahty6gcwq7en@pd.tnic> Message-ID: References: <20161012175731.29619-1-piotr.luc@intel.com> <20161016142233.xuqrahty6gcwq7en@pd.tnic> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1013 Lines: 26 On Sun, 16 Oct 2016, Borislav Petkov wrote: > > The spec can be found in Intel Software Developer Manual or in > > Instruction Set Extensions Programming Reference. See > > https://software.intel.com/sites/default/files/managed/69/78/319433-025.pdf. > > > +/* Intel-defined CPU features, CPUID level 0x00000007:0 (edx), word 18 */ > > +#define X86_FEATURE_AVX512_4VNNIW (18*32+2) /* AVX-512 Neural Network Instructions */ > > +#define X86_FEATURE_AVX512_4FMAPS (18*32+3) /* AVX-512 Multiply Accumulation Single precision */ > > This is getting ridiculous: we keep adding new leafs to > ->x86_capability, thus bloating cpuinfo_x86 but then it is not even > worth it - this patch defines only two bits. What's worse is that the Instruction Set Extensions Programming Reference manual says: CPUID.(EAX=07H, ECX=0):EDX[bit 02] AVX512_4FMAPS CPUID.(EAX=07H, ECX=0):EBX[bit 03] AVX512_4VNNIW So AVX512_4VNNIW is in EBX not EDX. What's correct here? The manual or the patch? I'm going to zap it. Thanks, tglx