[patch V2 00/30] x86/fpu: Preparatory cleanups for AMX support (part 1)

From: Thomas Gleixner
Date: Thu Oct 14 2021 - 21:15:59 EST


This is the rework of the V1 part-1 series of the effort to support the new
AMX feature:

https://lore.kernel.org/r/20211011215813.558681373@xxxxxxxxxxxxx

This part cleans up existing mess. Historical leftovers, shortcomings and
especially the universal kitchen sink asm/fpu/internal.h which is included
all over the place for the wrong reasons.

This series has a value independent of AMX, but allows to make the
integration and conversion to the new world order of dynamically enabled
feature bits simpler.

The serries is based on:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/fpu

and also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-1

The full series which has the full AMX support included can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu

Changes vs. V1:

- Fixed the issue in the !XSAVE code path of the kvm UABI copy function -
Paolo

- Renamed the KVM functions - Boris, Paolo, Sean

- Fixed the comments and changelog issues - Boris

Thanks,

tglx
---
arch/x86/events/perf_event.h | 1
arch/x86/ia32/ia32_signal.c | 1
arch/x86/include/asm/fpu/api.h | 31 ++
arch/x86/include/asm/fpu/internal.h | 530 ------------------------------------
arch/x86/include/asm/fpu/signal.h | 13
arch/x86/include/asm/fpu/xcr.h | 11
arch/x86/include/asm/fpu/xstate.h | 6
arch/x86/include/asm/pkru.h | 2
arch/x86/kernel/cpu/bugs.c | 2
arch/x86/kernel/cpu/common.c | 2
arch/x86/kernel/fpu/bugs.c | 2
arch/x86/kernel/fpu/core.c | 161 ++++++++--
arch/x86/kernel/fpu/init.c | 29 -
arch/x86/kernel/fpu/regset.c | 6
arch/x86/kernel/fpu/signal.c | 21 -
arch/x86/kernel/fpu/xstate.c | 172 ++++++-----
arch/x86/kernel/process.c | 6
arch/x86/kernel/process_32.c | 5
arch/x86/kernel/process_64.c | 5
arch/x86/kernel/ptrace.c | 1
arch/x86/kernel/sev.c | 2
arch/x86/kernel/signal.c | 1
arch/x86/kernel/smpboot.c | 2
arch/x86/kernel/traps.c | 2
arch/x86/kvm/svm/sev.c | 2
arch/x86/kvm/vmx/vmx.c | 2
arch/x86/kvm/x86.c | 192 +------------
arch/x86/math-emu/fpu_entry.c | 2
arch/x86/mm/extable.c | 4
arch/x86/power/cpu.c | 2
b/arch/x86/include/asm/fpu/sched.h | 68 ++++
b/arch/x86/kernel/fpu/context.h | 85 +++++
b/arch/x86/kernel/fpu/internal.h | 30 ++
b/arch/x86/kernel/fpu/legacy.h | 115 +++++++
b/arch/x86/kernel/fpu/xstate.h | 198 +++++++++++++
35 files changed, 824 insertions(+), 890 deletions(-)