x86/cpufeatures: Enable new AVX512 cpu features
Add a few new AVX512 instruction groups/features for enumeration in /proc/cpuinfo: AVX512IFMA and AVX512VBMI. Clear the flags in fpu_xstate_clear_all_cpu_caps(). CPUID.(EAX=7,ECX=0):EBX[bit 21] AVX512IFMA CPUID.(EAX=7,ECX=0):ECX[bit 1] AVX512VBMI Detailed information of cpuid bits for the features can be found at https://bugzilla.kernel.org/show_bug.cgi?id=187891 Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com> Reviewed-by: Borislav Petkov <bp@alien8.de> Cc: Ravi Shankar <ravi.v.shankar@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: mingo@elte.hu Link: http://lkml.kernel.org/r/1479327060-18668-1-git-send-email-gayatri.kammela@intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
47bdf3378d
commit
a8d9df5a50
|
@ -226,6 +226,7 @@
|
||||||
#define X86_FEATURE_RDSEED ( 9*32+18) /* The RDSEED instruction */
|
#define X86_FEATURE_RDSEED ( 9*32+18) /* The RDSEED instruction */
|
||||||
#define X86_FEATURE_ADX ( 9*32+19) /* The ADCX and ADOX instructions */
|
#define X86_FEATURE_ADX ( 9*32+19) /* The ADCX and ADOX instructions */
|
||||||
#define X86_FEATURE_SMAP ( 9*32+20) /* Supervisor Mode Access Prevention */
|
#define X86_FEATURE_SMAP ( 9*32+20) /* Supervisor Mode Access Prevention */
|
||||||
|
#define X86_FEATURE_AVX512IFMA ( 9*32+21) /* AVX-512 Integer Fused Multiply-Add instructions */
|
||||||
#define X86_FEATURE_CLFLUSHOPT ( 9*32+23) /* CLFLUSHOPT instruction */
|
#define X86_FEATURE_CLFLUSHOPT ( 9*32+23) /* CLFLUSHOPT instruction */
|
||||||
#define X86_FEATURE_CLWB ( 9*32+24) /* CLWB instruction */
|
#define X86_FEATURE_CLWB ( 9*32+24) /* CLWB instruction */
|
||||||
#define X86_FEATURE_AVX512PF ( 9*32+26) /* AVX-512 Prefetch */
|
#define X86_FEATURE_AVX512PF ( 9*32+26) /* AVX-512 Prefetch */
|
||||||
|
@ -279,6 +280,7 @@
|
||||||
#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
|
#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
|
||||||
|
|
||||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */
|
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */
|
||||||
|
#define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
|
||||||
#define X86_FEATURE_PKU (16*32+ 3) /* Protection Keys for Userspace */
|
#define X86_FEATURE_PKU (16*32+ 3) /* Protection Keys for Userspace */
|
||||||
#define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */
|
#define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ void fpu__xstate_clear_all_cpu_caps(void)
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX);
|
setup_clear_cpu_cap(X86_FEATURE_AVX);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX2);
|
setup_clear_cpu_cap(X86_FEATURE_AVX2);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX512F);
|
setup_clear_cpu_cap(X86_FEATURE_AVX512F);
|
||||||
|
setup_clear_cpu_cap(X86_FEATURE_AVX512IFMA);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX512PF);
|
setup_clear_cpu_cap(X86_FEATURE_AVX512PF);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX512ER);
|
setup_clear_cpu_cap(X86_FEATURE_AVX512ER);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX512CD);
|
setup_clear_cpu_cap(X86_FEATURE_AVX512CD);
|
||||||
|
@ -73,6 +74,7 @@ void fpu__xstate_clear_all_cpu_caps(void)
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX512VL);
|
setup_clear_cpu_cap(X86_FEATURE_AVX512VL);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_MPX);
|
setup_clear_cpu_cap(X86_FEATURE_MPX);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_XGETBV1);
|
setup_clear_cpu_cap(X86_FEATURE_XGETBV1);
|
||||||
|
setup_clear_cpu_cap(X86_FEATURE_AVX512VBMI);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_PKU);
|
setup_clear_cpu_cap(X86_FEATURE_PKU);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX512_4VNNIW);
|
setup_clear_cpu_cap(X86_FEATURE_AVX512_4VNNIW);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX512_4FMAPS);
|
setup_clear_cpu_cap(X86_FEATURE_AVX512_4FMAPS);
|
||||||
|
|
Loading…
Reference in New Issue