Skip to content

x86/fpu: FPU init code bugfixes

yu-cheng yu lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/fpu: Fix early fpu command-line parsingarch/x86/kernel/fpu/init.c+38 -714 replies
2/4x86/fpu: Disable XGETBV1 when no XSAVEarch/x86/kernel/fpu/xstate.c+1 -00 replies
3/4x86/fpu: Disable MPX when eagerfpu is offarch/x86/include/asm/fpu/internal.h arch/x86/kernel/fpu/init.c arch/x86/kernel/fpu/xstate.c+46 -140 replies
4/4x86/fpu: Disable AVX when eagerfpu is offarch/x86/include/asm/fpu/xstate.h arch/x86/kernel/fpu/init.c+12 -50 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchDave Hansen
1/4
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] x86/fpu: FPU init code bugfixes

The function fpu__init_system() is executed before parse_early_param(). This causes wrong fpu configuration. In addition, there are three related issues:

1. XGETBV1 is enabled when noxsave is given
2. MPX is enabled when eagerfpu=off is given
3. AVX is enabled when eagerfpu=off is given

Issues 1 and 3 are existing bugs. Issue 2 is a fallout from the command-line parsing move.

The following four patches fix these issues.

yu-cheng yu (4):
x86/fpu: Fix early fpu command-line parsing.
x86/fpu: Disable XGETBV1 when no XSAVE.
x86/fpu: Disable MPX when eagerfpu is off.
x86/fpu: Disable AVX when eagerfpu is off.

 arch/x86/include/asm/fpu/internal.h |   1 +
 arch/x86/include/asm/fpu/xstate.h   |  11 +--
 arch/x86/kernel/fpu/init.c          | 161 +++++++++++++++++++-----------------
 arch/x86/kernel/fpu/xstate.c        |   4 +-
 4 files changed, 92 insertions(+), 85 deletions(-)
Cc H. Peter Anvin <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Sai Praneeth Prakhya <[email protected]>
Cc Ravi V. Shankar <[email protected]>
Cc Fenghua Yu <[email protected]>
Signature · 1 line
1.9.1