All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.20 0/4] x86: FPU handling cleanup
@ 2024-07-09 15:52 Alejandro Vallejo
  2024-07-09 15:52 ` [PATCH for-4.20 1/4] x86/xstate: Use compression check helper in xstate_all() Alejandro Vallejo
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Alejandro Vallejo @ 2024-07-09 15:52 UTC (permalink / raw)
  To: Xen-devel
  Cc: Alejandro Vallejo, Jan Beulich, Andrew Cooper,
	Roger Pau Monné

I want to eventually reach a position in which the FPU state can be allocated
from the domheap and hidden via the same core mechanism proposed in Elias'
directmap removal series. Doing so is complicated by the presence of 2 aliased
pointers (v->arch.fpu_ctxt and v->arch.xsave_area) and the rather complicated
semantics of vcpu_setup_fpu(). This series tries to simplify the code so moving
to a "map/modify/unmap" model is more tractable.

Patches 1 and 2 are trivial refactors.

Patch 3 unifies FPU state so an XSAVE area is allocated per vCPU regardless of
the host supporting it or not. The rationale is that the memory savings are
negligible and not worth the extra complexity.

Patch 4 is a non-trivial split of the vcpu_setup_fpu() into 2 separate
functions. One to override x87/SSE state, and another to set a reset state.

Alejandro Vallejo (4):
  x86/xstate: Use compression check helper in xstate_all()
  x86/fpu: Create a typedef for the x87/SSE area inside "struct
    xsave_struct"
  x86/fpu: Combine fpu_ctxt and xsave_area in arch_vcpu
  x86/fpu: Split fpu_setup_fpu() in two

 xen/arch/x86/domain.c             |  7 ++-
 xen/arch/x86/domctl.c             |  3 +-
 xen/arch/x86/hvm/emulate.c        |  5 +-
 xen/arch/x86/hvm/hvm.c            | 22 +++++---
 xen/arch/x86/i387.c               | 93 ++++++++-----------------------
 xen/arch/x86/include/asm/domain.h |  7 +--
 xen/arch/x86/include/asm/i387.h   | 27 +++++++--
 xen/arch/x86/include/asm/xstate.h | 17 +++---
 xen/arch/x86/x86_emulate/blk.c    |  3 +-
 xen/arch/x86/xstate.c             | 15 +++--
 10 files changed, 90 insertions(+), 109 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-08-07 14:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 15:52 [PATCH for-4.20 0/4] x86: FPU handling cleanup Alejandro Vallejo
2024-07-09 15:52 ` [PATCH for-4.20 1/4] x86/xstate: Use compression check helper in xstate_all() Alejandro Vallejo
2024-07-18 11:20   ` Jan Beulich
2024-07-09 15:52 ` [PATCH for-4.20 2/4] x86/fpu: Create a typedef for the x87/SSE area inside "struct xsave_struct" Alejandro Vallejo
2024-07-18 11:23   ` Jan Beulich
2024-07-18 15:54     ` Alejandro Vallejo
2024-07-09 15:52 ` [PATCH for-4.20 3/4] x86/fpu: Combine fpu_ctxt and xsave_area in arch_vcpu Alejandro Vallejo
2024-07-18 11:49   ` Jan Beulich
2024-07-18 16:54     ` Alejandro Vallejo
2024-07-19  9:14       ` Jan Beulich
2024-08-07 14:41         ` Alejandro Vallejo
2024-07-09 15:52 ` [PATCH for-4.20 4/4] x86/fpu: Split fpu_setup_fpu() in two Alejandro Vallejo
2024-07-18 12:19   ` Jan Beulich
2024-07-18 17:25     ` Alejandro Vallejo
2024-07-19  9:24       ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.