lkml.org 
[lkml]   [2022]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/5] perf/x86/intel/lbr: use setup_clear_cpu_cap instead of clear_cpu_cap
From
On 11/2/22 15:27, Elliott, Robert (Servers) wrote:
>
> 3. Similarly, modules using X86_FEATURE_XMM2 probably need to
> check XFEATURE_MASK_SSE:
>
> Currently checking XSAVE SSE:
> aegis128-aesni-glue
>
> Current not checking XSAVE SSE:
> nhpoly1305-sse2_glue
> serpent_sse2_glue

These should check boot_cpu_has(X86_FEATURE_FXSR). Checking
XFEATURE_MASK_SSE will fail on systems without XSAVE, because
fpu_kernel_cfg.max_features is zero there (see fpu__init_system_xstate()
in arch/x86/kernel/fpu/xstate.c).

It happens to work for aegis128-aesni-glue because AES instructions only
exist on new-enough parts, but it should probably be changed as well.

Paolo

\
 
 \ /
  Last update: 2022-11-03 14:32    [W:0.033 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site