From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: x86@kernel.org, "Chang S. Bae" <chang.seok.bae@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Arjan van de Ven <arjan@linux.intel.com>,
kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: [patch 0/8] x86/fpu: Consolidate the size and feature information (part 3)
Date: Fri, 15 Oct 2021 01:09:28 +0200 (CEST) [thread overview]
Message-ID: <20211014225711.615197738@linutronix.de> (raw)
This is the third part of the effort to support AMX. The second part can be
found here:
https://lore.kernel.org/r/20211013142847.120153383@linutronix.de
With AMX the FPU register state buffer which is part of
task_struct::thread::fpu is not going to be extended unconditionally for
all tasks on an AMX enabled system as that would waste minimum 8K per task.
AMX provides a mechanism to trap on first use. That trap will be utilized
to allocate a larger register state buffer when the task (process) has
permissions to use it. The default buffer task_struct will only carry
states up to AVX512.
This needs more information than what is provided now with various
variables.
The original approach was to just add more variables, but it's simpler to
stick this into data structures.
The current series:
- creates a data structure which carries the necessary information:
default and maximum features and sizes.
- instantiates and initializes one for kernel information and one for user
space
- converts all users of the old variables
- removes the now unused old variables
It's a straight forward conversion which should not introduce any
functional changes.
This series is based on:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-2
and also available from git:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-3
The full series with part 4 on top is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu
Thanks,
tglx
---
include/asm/fpu/types.h | 39 ++++++++++
include/asm/fpu/xstate.h | 47 +-----------
kernel/fpu/context.h | 6 -
kernel/fpu/core.c | 37 +++++++---
kernel/fpu/init.c | 46 +++++-------
kernel/fpu/internal.h | 2
kernel/fpu/regset.c | 2
kernel/fpu/signal.c | 11 +-
kernel/fpu/xstate.c | 173 +++++++++++++++++++++++++----------------------
kernel/fpu/xstate.h | 15 +++-
10 files changed, 205 insertions(+), 173 deletions(-)
next reply other threads:[~2021-10-14 23:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 23:09 Thomas Gleixner [this message]
2021-10-14 23:09 ` [patch 1/8] x86/fpu: Provide struct fpu_config Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2021-10-14 23:09 ` [patch 2/8] x86/fpu: Cleanup fpu__init_system_xstate_size_legacy() Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2021-10-14 23:09 ` [patch 3/8] x86/fpu/xstate: Cleanup size calculations Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2021-10-14 23:09 ` [patch 4/8] x86/fpu: Move xstate size to fpu_*_cfg Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2021-10-14 23:09 ` [patch 5/8] x86/fpu: Move xstate feature masks " Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2021-10-14 23:09 ` [patch 6/8] x86/fpu: Mop up xfeatures_mask_uabi() Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2021-10-14 23:09 ` [patch 7/8] x86/fpu: Rework restore_regs_from_fpstate() Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2021-10-14 23:09 ` [patch 8/8] x86/fpu/xstate: Move remaining xfeature helpers to core Thomas Gleixner
2021-10-22 19:56 ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211014225711.615197738@linutronix.de \
--to=tglx@linutronix.de \
--cc=arjan@linux.intel.com \
--cc=chang.seok.bae@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®