Skip to content

x86/fpu: APX enablement and assorted FPU code improvements

Chang S. Bae lkml 1 version Applied

Status from this message: Applied to tip:x86/fpu, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/10x86/cpufeatures: Add X86_FEATURE_APXarch/x86/include/asm/cpufeatures.h arch/x86/kernel/cpu/cpuid-deps.c arch/x86/kernel/cpu/scattered.c+3 -00 replies
2/10x86/fpu/apx: Define APX state componentarch/x86/include/asm/fpu/types.h arch/x86/kernel/fpu/xstate.c+12 -00 replies
3/10x86/fpu/apx: Disallow conflicting MPX presencearch/x86/kernel/fpu/xstate.c+11 -00 replies
4/10x86/fpu/apx: Enable APX state supportarch/x86/include/asm/fpu/xstate.h arch/x86/kernel/fpu/xstate.c+4 -20 replies
5/10selftests/x86/apx: Add APX testtools/testing/selftests/x86/Makefile tools/testing/selftests/x86/apx.c tools/testing/selftests/x86/xstate.c +1 more+16 -20 replies
6/10x86/fpu: Log XSAVE disablement consistentlyarch/x86/kernel/fpu/xstate.c+5 -33 replies
7/10x86/fpu: Refactor xfeature bitmask update code for sigframe XSAVEarch/x86/kernel/fpu/signal.c arch/x86/kernel/fpu/xstate.h+13 -102 replies
8/10x86/pkeys: Simplify PKRU update in signal framearch/x86/kernel/fpu/xstate.h+3 -60 replies
9/10x86/fpu: Remove export of mxcsr_feature_maskarch/x86/kernel/fpu/init.c+0 -10 replies
10/10x86/fpu: Rename fpu_reset_fpregs() to fpu_reset_fpstate_regs()arch/x86/kernel/fpu/core.c+3 -30 replies

Reviews trailers per patch

6 of 10 patches have a Reviewed-by or Acked-by.

PatchSohil MehtaNikolay Borisov
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10
7/10
8/10
9/10R-b
10/10

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 00/10] x86/fpu: APX enablement and assorted FPU code improvements
Quoted 4 lines · Ingo Molnar

Chang, mind sending a series of the latest version of all the pending APX patches you have at the moment (and any other pending FPU patches you may have), with Reviewed-by tags rolled in, etc.

Hi Ingo,

Here’s the updated patch set following up on the previous APX series [1], along with a collection of additional FPU-related cleanups and improvements that were previously posted or discussed.

The series is organized into two parts:

1. APX Enabling (PATCH 1–5)

These patches complete the APX bring-up. After laying the groundwork, this portion finalizes the enablement:

* Patches 1, 2, and 4 are typical xfeature plumbing.

* Patch 3 handles MPX conflict -- unexpected hardware issue

* Patch 5 adds a test case.

2. Miscellaneous FPU Code Improvements (PATCH 6–10)

This batch includes various standalone improvements:

* Patch 6: Centralizes the XSAVE disablement message

* Patches 7-8: Simplifies PKRU update in XSTATE_BV on sigframe

* Patch 9: Removes the unused mxcsr_feature_mask export

* Patch 10: Renames fpu_reset_fpregs() for clarity

Each patch includes context and links to earlier discussions or revisions.

As you noted in [2], the series is based on the x86/fpu branch and is available at:

git://github.com/intel/apx.git apx-and-misc

[1]: https://lore.kernel.org/lkml/[email protected]
[2]: https://lore.kernel.org/lkml/[email protected]

Thanks,
Chang

Chang S. Bae (10):
x86/cpufeatures: Add X86_FEATURE_APX
x86/fpu/apx: Define APX state component
x86/fpu/apx: Disallow conflicting MPX presence x86/fpu/apx: Enable APX state support selftests/x86/apx: Add APX test
x86/fpu: Log XSAVE disablement consistently
x86/fpu: Refactor xfeature bitmask update code for sigframe XSAVE x86/pkeys: Simplify PKRU update in signal frame x86/fpu: Remove export of mxcsr_feature_mask
x86/fpu: Rename fpu_reset_fpregs() to fpu_reset_fpstate_regs()

 arch/x86/include/asm/cpufeatures.h   |  1 +
 arch/x86/include/asm/fpu/types.h     |  9 +++++++++
 arch/x86/include/asm/fpu/xstate.h    |  3 ++-
 arch/x86/kernel/cpu/cpuid-deps.c     |  1 +
 arch/x86/kernel/cpu/scattered.c      |  1 +
 arch/x86/kernel/fpu/core.c           |  6 +++---
 arch/x86/kernel/fpu/init.c           |  1 -
 arch/x86/kernel/fpu/signal.c         | 11 +----------
 arch/x86/kernel/fpu/xstate.c         | 23 ++++++++++++++++++++---
 arch/x86/kernel/fpu/xstate.h         | 21 +++++++++++++++------
 tools/testing/selftests/x86/Makefile |  3 ++-
 tools/testing/selftests/x86/apx.c    | 10 ++++++++++
 tools/testing/selftests/x86/xstate.c |  3 ++-
 tools/testing/selftests/x86/xstate.h |  2 ++
 14 files changed, 69 insertions(+), 26 deletions(-)
 create mode 100644 tools/testing/selftests/x86/apx.c

base-commit: e3a52b67f54aa36ab21265eeea016460b5fe1c46

Signature · 1 line
2.45.2