xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] x86/xstate: Fixes to size calculations
@ 2021-05-03 15:39 Andrew Cooper
  2021-05-03 15:39 ` [PATCH 1/5] x86/xstate: Elide redundant writes in set_xcr0() Andrew Cooper
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Andrew Cooper @ 2021-05-03 15:39 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich, Roger Pau Monné, Wei Liu

Various fixes and improvements to xsave image size calculations.

 * Skip redundant xcr0 writes
 * Don't reconfigure xcr0 to query hardware when we can trivially calculate
   the answer ourselves.
 * Fix latent bug with CPUID.0xD[0].ebx.
 * Rework CPUID.0xD[1].ebx to behave correctly when supervisor states are in
   use.

Results from AMD Milan with some prototype CET handling, as well as the debug
cross checks, in place:
  (d1) xstates 0x0001, uncomp 0x240, comp 0x240
  (d1) xstates 0x0003, uncomp 0x240, comp 0x240
  (d1) xstates 0x0007, uncomp 0x340, comp 0x340
  (d1) xstates 0x0207, uncomp 0x988, comp 0x348
  (d1) xstates 0x0a07, uncomp 0x988, comp 0x358
  (d1) xstates 0x1a07, uncomp 0x988, comp 0x370

Andrew Cooper (5):
  x86/xstate: Elide redundant writes in set_xcr0()
  x86/xstate: Rename _xstate_ctxt_size() to hw_uncompressed_size()
  x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()
  x86/cpuid: Simplify recalculate_xstate()
  x86/cpuid: Fix handling of xsave dynamic leaves

 xen/arch/x86/cpuid.c         |  75 +++++++++------------------
 xen/arch/x86/domain.c        |   4 +-
 xen/arch/x86/domctl.c        |   2 +-
 xen/arch/x86/hvm/hvm.c       |   2 +-
 xen/arch/x86/xstate.c        | 117 +++++++++++++++++++++++++++++++++++--------
 xen/include/asm-x86/xstate.h |   3 +-
 6 files changed, 126 insertions(+), 77 deletions(-)

-- 
2.11.0



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

end of thread, other threads:[~2021-05-06  6:17 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 15:39 [PATCH 0/5] x86/xstate: Fixes to size calculations Andrew Cooper
2021-05-03 15:39 ` [PATCH 1/5] x86/xstate: Elide redundant writes in set_xcr0() Andrew Cooper
2021-05-04 11:51   ` Jan Beulich
2021-05-03 15:39 ` [PATCH 2/5] x86/xstate: Rename _xstate_ctxt_size() to hw_uncompressed_size() Andrew Cooper
2021-05-04 11:53   ` Jan Beulich
2021-05-03 15:39 ` [PATCH 3/5] x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size() Andrew Cooper
2021-05-03 18:17   ` Andrew Cooper
2021-05-04 12:08     ` Jan Beulich
2021-05-04 12:15       ` Andrew Cooper
2021-05-04 12:20   ` Jan Beulich
2021-05-04 12:22     ` Andrew Cooper
2021-05-04 12:45       ` Jan Beulich
2021-05-03 15:39 ` [PATCH 4/5] x86/cpuid: Simplify recalculate_xstate() Andrew Cooper
2021-05-04 12:43   ` Jan Beulich
2021-05-04 13:58     ` Andrew Cooper
2021-05-05  8:19       ` Jan Beulich
2021-05-05 14:53         ` Andrew Cooper
2021-05-05 15:14           ` Jan Beulich
2021-05-03 15:39 ` [PATCH 5/5] x86/cpuid: Fix handling of xsave dynamic leaves Andrew Cooper
2021-05-04 12:56   ` Jan Beulich
2021-05-04 14:17     ` Andrew Cooper
2021-05-05  8:33       ` Jan Beulich
2021-05-05 16:59         ` Andrew Cooper
2021-05-06  6:17           ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).