mbox series

[v3,00/12] x86: Address Space Isolation FPU preparations

Message ID 20250110132823.24348-1-alejandro.vallejo@cloud.com (mailing list archive)
Headers show
Series x86: Address Space Isolation FPU preparations | expand

Message

Alejandro Vallejo Jan. 10, 2025, 1:28 p.m. UTC
See original cover letter in v1

v2: https://lore.kernel.org/xen-devel/20241105143310.28301-1-alejandro.vallejo@cloud.com/
v2->v3:
  * Evaluated `v` argument in UNMAP operation (see patch 1)
  * Fixed bug on (de)compressing xstates by not unmapping them on early return.
  * Constified more when converting (f)xrstor and (f)xsave

v1: https://lore.kernel.org/xen-devel/20241028154932.6797-1-alejandro.vallejo@cloud.com/
v1->v2:
  * Turned v1/patch1 into an assert removal
  * Dropped v1/patch11: "x86/mpx: Adjust read_bndcfgu() to clean after itself"
  * Other minor changes out of feedback. Explained in each patch.

Alejandro Vallejo (12):
  x86/xstate: Create map/unmap primitives for xsave areas
  x86/hvm: Map/unmap xsave area in hvm_save_cpu_ctxt()
  x86/fpu: Map/umap xsave area in vcpu_{reset,setup}_fpu()
  x86/xstate: Map/unmap xsave area in xstate_set_init() and
    handle_setbv()
  x86/hvm: Map/unmap xsave area in hvmemul_{get,put}_fpu()
  x86/domctl: Map/unmap xsave area in arch_get_info_guest()
  x86/xstate: Map/unmap xsave area in {compress,expand}_xsave_states()
  x86/emulator: Refactor FXSAVE_AREA to use wrappers
  x86/mpx: Map/unmap xsave area in in read_bndcfgu()
  x86/fpu: Pass explicit xsave areas to fpu_(f)xsave()
  x86/fpu: Pass explicit xsave areas to fpu_(f)xrstor()
  x86/xstate: Make xstate_all() and vcpu_xsave_mask() take explicit
    xstate

 xen/arch/x86/domctl.c             |  9 ++--
 xen/arch/x86/hvm/emulate.c        | 12 +++++-
 xen/arch/x86/hvm/hvm.c            |  8 ++--
 xen/arch/x86/i387.c               | 69 ++++++++++++++++++++-----------
 xen/arch/x86/include/asm/xstate.h | 51 +++++++++++++++++++++--
 xen/arch/x86/x86_emulate/blk.c    | 11 ++++-
 xen/arch/x86/xstate.c             | 53 +++++++++++++++++-------
 7 files changed, 157 insertions(+), 56 deletions(-)