mbox series

[v2,0/4] x86/xstate: Fixes to size calculations

Message ID 20240429182823.1130436-1-andrew.cooper3@citrix.com (mailing list archive)
Headers show
Series x86/xstate: Fixes to size calculations | expand

Message

Andrew Cooper April 29, 2024, 6:28 p.m. UTC
Various fixes and improvements to xsave image size calculations.

Since v1:
 * Rebase over exposing XSAVEC.  This has highlighted several latent bugs.
 * Rework the uncompressed size handling.  LWP / APX_F make for much sadness.

Be aware that Intel and AMD have different ABIs for the xstate layout.

Andrew Cooper (4):
  x86/hvm: Defer the size calculation in hvm_save_cpu_xsave_states()
  x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()
  x86/cpu-policy: Simplify recalculate_xstate()
  x86/cpuid: Fix handling of xsave dynamic leaves

 xen/arch/x86/cpu-policy.c         |  55 ++++++---------
 xen/arch/x86/cpuid.c              |  24 +++----
 xen/arch/x86/domctl.c             |   2 +-
 xen/arch/x86/hvm/hvm.c            |  12 +++-
 xen/arch/x86/include/asm/xstate.h |   4 +-
 xen/arch/x86/xstate.c             | 111 ++++++++++++++++++++++++++++--
 6 files changed, 145 insertions(+), 63 deletions(-)