mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 14:50:05 +00:00
WIP observations from an XSAVE size mismatch kernel issue
This commit is contained in:
parent
11db7b454a
commit
a45dbfef5a
@ -59,169 +59,176 @@ _dl_x86_cpu_feature_diagnostics_run (const struct cpu_features *cpu_features,
|
|||||||
{
|
{
|
||||||
/* x86-64-v2 features. */
|
/* x86-64-v2 features. */
|
||||||
extern void _dl_x86_probe_cmpxchg16b (void) attribute_hidden;
|
extern void _dl_x86_probe_cmpxchg16b (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, CMPXCHG16B),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, CMPXCHG16B),
|
||||||
_dl_x86_probe_cmpxchg16b);
|
_dl_x86_probe_cmpxchg16b);
|
||||||
|
|
||||||
extern void _dl_x86_probe_sahf (void) attribute_hidden;
|
extern void _dl_x86_probe_sahf (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, LAHF64_SAHF64),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, LAHF64_SAHF64),
|
||||||
_dl_x86_probe_sahf);
|
_dl_x86_probe_sahf);
|
||||||
|
|
||||||
extern void _dl_x86_probe_popcnt (void) attribute_hidden;
|
extern void _dl_x86_probe_popcnt (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, POPCNT),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, POPCNT),
|
||||||
_dl_x86_probe_popcnt);
|
_dl_x86_probe_popcnt);
|
||||||
|
|
||||||
extern void _dl_x86_probe_sse3 (void) attribute_hidden;
|
extern void _dl_x86_probe_sse3 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, SSE3),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, SSE3),
|
||||||
_dl_x86_probe_sse3);
|
_dl_x86_probe_sse3);
|
||||||
|
|
||||||
extern void _dl_x86_probe_sse4_1 (void) attribute_hidden;
|
extern void _dl_x86_probe_sse4_1 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, SSE4_1),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, SSE4_1),
|
||||||
_dl_x86_probe_sse4_1);
|
_dl_x86_probe_sse4_1);
|
||||||
|
|
||||||
extern void _dl_x86_probe_sse4_2 (void) attribute_hidden;
|
extern void _dl_x86_probe_sse4_2 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, SSE4_2),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, SSE4_2),
|
||||||
_dl_x86_probe_sse4_2);
|
_dl_x86_probe_sse4_2);
|
||||||
|
|
||||||
extern void _dl_x86_probe_ssse3 (void) attribute_hidden;
|
extern void _dl_x86_probe_ssse3 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, SSSE3),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, SSSE3),
|
||||||
_dl_x86_probe_ssse3);
|
_dl_x86_probe_ssse3);
|
||||||
|
|
||||||
/* x86-64-v3 features. */
|
/* x86-64-v3 features. */
|
||||||
extern void _dl_x86_probe_avx (void) attribute_hidden;
|
extern void _dl_x86_probe_avx (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX),
|
||||||
_dl_x86_probe_avx);
|
_dl_x86_probe_avx);
|
||||||
|
|
||||||
/* AVX probe using xmm registers. */
|
/* AVX probe using xmm registers. */
|
||||||
extern void _dl_x86_probe_avx_xmm (void) attribute_hidden;
|
extern void _dl_x86_probe_avx_xmm (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX),
|
||||||
_dl_x86_probe_avx_xmm);
|
_dl_x86_probe_avx_xmm);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx2 (void) attribute_hidden;
|
extern void _dl_x86_probe_avx2 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX2),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX2),
|
||||||
_dl_x86_probe_avx2);
|
_dl_x86_probe_avx2);
|
||||||
|
|
||||||
extern void _dl_x86_probe_bmi1 (void) attribute_hidden;
|
extern void _dl_x86_probe_bmi1 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, BMI1),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, BMI1),
|
||||||
_dl_x86_probe_bmi1);
|
_dl_x86_probe_bmi1);
|
||||||
|
|
||||||
/* Alternative BMI1 probe. Perhaps harder to mask. */
|
/* Alternative BMI1 probe. Perhaps harder to mask. */
|
||||||
extern void _dl_x86_probe_bmi1_tzcnt (void) attribute_hidden;
|
extern void _dl_x86_probe_bmi1_tzcnt (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, BMI1),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, BMI1),
|
||||||
_dl_x86_probe_bmi1_tzcnt);
|
_dl_x86_probe_bmi1_tzcnt);
|
||||||
|
|
||||||
extern void _dl_x86_probe_bmi2 (void) attribute_hidden;
|
extern void _dl_x86_probe_bmi2 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, BMI2),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, BMI2),
|
||||||
_dl_x86_probe_bmi2);
|
_dl_x86_probe_bmi2);
|
||||||
|
|
||||||
extern void _dl_x86_probe_f16c (void) attribute_hidden;
|
extern void _dl_x86_probe_f16c (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, F16C),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, F16C),
|
||||||
_dl_x86_probe_f16c);
|
_dl_x86_probe_f16c);
|
||||||
|
|
||||||
extern void _dl_x86_probe_fma (void) attribute_hidden;
|
extern void _dl_x86_probe_fma (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, FMA),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, FMA),
|
||||||
_dl_x86_probe_fma);
|
_dl_x86_probe_fma);
|
||||||
|
|
||||||
/* FMA4 is not part of x86-64-v3, but may produce a useful hint. */
|
/* FMA4 is not part of x86-64-v3, but may produce a useful hint. */
|
||||||
extern void _dl_x86_probe_fma4 (void) attribute_hidden;
|
extern void _dl_x86_probe_fma4 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, FMA4),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, FMA4),
|
||||||
_dl_x86_probe_fma4);
|
_dl_x86_probe_fma4);
|
||||||
|
|
||||||
extern void _dl_x86_probe_lzcnt (void) attribute_hidden;
|
extern void _dl_x86_probe_lzcnt (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, LZCNT),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, LZCNT),
|
||||||
_dl_x86_probe_lzcnt);
|
_dl_x86_probe_lzcnt);
|
||||||
|
|
||||||
extern void _dl_x86_probe_movbe (void) attribute_hidden;
|
extern void _dl_x86_probe_movbe (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, MOVBE),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, MOVBE),
|
||||||
_dl_x86_probe_movbe);
|
_dl_x86_probe_movbe);
|
||||||
|
|
||||||
extern void _dl_x86_probe_osxsave (void) attribute_hidden;
|
extern void _dl_x86_probe_osxsave (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, OSXSAVE),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, OSXSAVE),
|
||||||
_dl_x86_probe_osxsave);
|
_dl_x86_probe_osxsave);
|
||||||
|
|
||||||
/* x86-64-v4 features. */
|
/* x86-64-v4 features. */
|
||||||
extern void _dl_x86_probe_avx512f (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512f (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512F),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512F),
|
||||||
_dl_x86_probe_avx512f);
|
_dl_x86_probe_avx512f);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512bw (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512bw (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512BW),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512BW),
|
||||||
_dl_x86_probe_avx512bw);
|
_dl_x86_probe_avx512bw);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512bw_ymm (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512bw_ymm (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512BW),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512BW),
|
||||||
_dl_x86_probe_avx512bw_ymm);
|
_dl_x86_probe_avx512bw_ymm);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512cd (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512cd (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512CD),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512CD),
|
||||||
_dl_x86_probe_avx512cd);
|
_dl_x86_probe_avx512cd);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512cd_ymm0 (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512cd_ymm0 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512CD),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512CD),
|
||||||
_dl_x86_probe_avx512cd_ymm0);
|
_dl_x86_probe_avx512cd_ymm0);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512vl (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512vl (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512VL),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512VL),
|
||||||
_dl_x86_probe_avx512vl);
|
_dl_x86_probe_avx512vl);
|
||||||
|
|
||||||
/* Other CPU features, not part of microarchitecture levels. */
|
/* Other CPU features, not part of microarchitecture levels. */
|
||||||
extern void _dl_x86_probe_adx (void) attribute_hidden;
|
extern void _dl_x86_probe_adx (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, ADX),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, ADX),
|
||||||
_dl_x86_probe_adx);
|
_dl_x86_probe_adx);
|
||||||
|
|
||||||
extern void _dl_x86_probe_aes (void) attribute_hidden;
|
extern void _dl_x86_probe_aes (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AES),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AES),
|
||||||
_dl_x86_probe_aes);
|
_dl_x86_probe_aes);
|
||||||
|
|
||||||
extern void _dl_x86_probe_aes_avx (void) attribute_hidden;
|
extern void _dl_x86_probe_aes_avx (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag,
|
_dl_x86_probe (diag,
|
||||||
CPU_FEATURE_USABLE_P (cpu_features, AES)
|
CPU_FEATURE_PRESENT_P (cpu_features, AES)
|
||||||
&& CPU_FEATURE_USABLE_P (cpu_features, AVX),
|
&& CPU_FEATURE_PRESENT_P (cpu_features, AVX),
|
||||||
_dl_x86_probe_aes_avx);
|
_dl_x86_probe_aes_avx);
|
||||||
|
|
||||||
extern void _dl_x86_probe_vaes (void) attribute_hidden;
|
extern void _dl_x86_probe_vaes (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, VAES),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, VAES),
|
||||||
_dl_x86_probe_vaes);
|
_dl_x86_probe_vaes);
|
||||||
|
|
||||||
extern void _dl_x86_probe_sha (void) attribute_hidden;
|
extern void _dl_x86_probe_sha (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, SHA),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, SHA),
|
||||||
_dl_x86_probe_sha);
|
_dl_x86_probe_sha);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512_vbmi (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512_vbmi (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512_VBMI),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512_VBMI),
|
||||||
_dl_x86_probe_avx512_vbmi);
|
_dl_x86_probe_avx512_vbmi);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512_vbmi_xmm (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512_vbmi_xmm (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512_VBMI),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512_VBMI),
|
||||||
_dl_x86_probe_avx512_vbmi_xmm);
|
_dl_x86_probe_avx512_vbmi_xmm);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512_vbmi2 (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512_vbmi2 (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512_VBMI2),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512_VBMI2),
|
||||||
_dl_x86_probe_avx512_vbmi2);
|
_dl_x86_probe_avx512_vbmi2);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512_vbmi2_xmm (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512_vbmi2_xmm (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512_VBMI2),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512_VBMI2),
|
||||||
_dl_x86_probe_avx512_vbmi2_xmm);
|
_dl_x86_probe_avx512_vbmi2_xmm);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx_vnni (void) attribute_hidden;
|
extern void _dl_x86_probe_avx_vnni (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX_VNNI),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX_VNNI),
|
||||||
_dl_x86_probe_avx_vnni);
|
_dl_x86_probe_avx_vnni);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512_vnni (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512_vnni (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512_VNNI),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512_VNNI),
|
||||||
_dl_x86_probe_avx512_vnni);
|
_dl_x86_probe_avx512_vnni);
|
||||||
|
|
||||||
extern void _dl_x86_probe_avx512_ifma (void) attribute_hidden;
|
extern void _dl_x86_probe_avx512_ifma (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, AVX512_IFMA),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, AVX512_IFMA),
|
||||||
_dl_x86_probe_avx512_ifma);
|
_dl_x86_probe_avx512_ifma);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
report both CPU_FEATURE_PRESENT_P and CPU_FEATURE_USABLE_P.
|
||||||
|
clearer xsave diagnostics
|
||||||
|
|
||||||
serialize
|
serialize
|
||||||
|
|
||||||
tpause
|
tpause
|
||||||
ptwrite
|
ptwrite
|
||||||
xsusldtrk
|
xsusldtrk
|
||||||
clmul
|
clmul
|
||||||
crc32
|
crc32
|
||||||
|
*/
|
||||||
|
|
||||||
extern void _dl_x86_probe_apx_f (void) attribute_hidden;
|
extern void _dl_x86_probe_apx_f (void) attribute_hidden;
|
||||||
_dl_x86_probe (diag, CPU_FEATURE_USABLE_P (cpu_features, APX_F),
|
_dl_x86_probe (diag, CPU_FEATURE_PRESENT_P (cpu_features, APX_F),
|
||||||
_dl_x86_probe_apx_f);
|
_dl_x86_probe_apx_f);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user