All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.11 00/10] x86: Improvements and fixes to Spectre handling
@ 2018-05-11 10:38 Andrew Cooper
  2018-05-11 10:38 ` [PATCH 01/10] x86/spec_ctrl: Read MSR_ARCH_CAPABILITIES only once Andrew Cooper
                   ` (12 more replies)
  0 siblings, 13 replies; 34+ messages in thread
From: Andrew Cooper @ 2018-05-11 10:38 UTC (permalink / raw)
  To: Xen-devel
  Cc: Juergen Gross, Wei Liu, Anthony Liguori, Andrew Cooper,
	Zhenzhong Duan, Martin Pohlack, Jan Beulich, Boris Ostrovsky,
	David Woodhouse, Roger Pau Monné

In hindsight, the end result of the Spectre mitigations aren't as great as I'd
hoped, and have several inefficiencies.  Also, the `bti=` command line option
isn't as flexible as intended.

This series does four things:

  1) Some internal cleanup, for clarity and to help the other features
  2) Introduce `spec-ctrl=no-pv` mode.  XenServer's performance measurements
     see a 10% net/disk performance improvement in some production scenarios.
  3) Introduce the ability to use IBPB-only mode for guests.  This was
     discussed by Amazon during the Spectre work, but I don't have any
     performance numbers to hand.
  4) Avoid imposing IBRS mode while dom0 is booting.  This was reported by
     Oracle on the list, and speeds up boot time on some servers by 50s.

I know this series is rather late for 4.11, but seeing as I've managed to
complete it before 4.12 opens, it should be considered at this point, as all
of the Spectre code is new in 4.11.

Andrew Cooper (10):
  x86/spec_ctrl: Read MSR_ARCH_CAPABILITIES only once
  x86/spec_ctrl: Express Xen's choice of MSR_SPEC_CTRL value as a variable
  x86/spec_ctrl: Merge bti_ist_info and use_shadow_spec_ctrl into spec_ctrl_flags
  x86/spec_ctrl: Fold the XEN_IBRS_{SET,CLEAR} ALTERNATIVES together
  x86/spec_ctrl: Rename bits of infrastructure to avoid NATIVE and VMEXIT
  x86/spec_ctrl: Split X86_FEATURE_SC_MSR into PV and HVM variants
  x86/spec_ctrl: Explicitly set Xen's default MSR_SPEC_CTRL value
  x86/cpuid: Improvements to guest policies for speculative sidechannel features
  x86/spec_ctrl: Introduce a new `spec-ctrl=` command line argument to replace `bti=`
  x86/spec_ctrl: Elide MSR_SPEC_CTRL handling in idle context when possible

 docs/misc/xen-command-line.markdown |  49 +++++++
 xen/arch/x86/acpi/power.c           |   4 +-
 xen/arch/x86/cpuid.c                |  60 +++++----
 xen/arch/x86/hvm/svm/entry.S        |   4 +-
 xen/arch/x86/hvm/vmx/entry.S        |   4 +-
 xen/arch/x86/setup.c                |   7 +
 xen/arch/x86/smpboot.c              |   8 ++
 xen/arch/x86/spec_ctrl.c            | 258 ++++++++++++++++++++++++++++--------
 xen/arch/x86/x86_64/asm-offsets.c   |   4 +-
 xen/arch/x86/x86_64/compat/entry.S  |   2 +-
 xen/arch/x86/x86_64/entry.S         |   2 +-
 xen/include/asm-x86/cpufeatures.h   |   9 +-
 xen/include/asm-x86/current.h       |   4 +-
 xen/include/asm-x86/spec_ctrl.h     |  20 +--
 xen/include/asm-x86/spec_ctrl_asm.h | 131 +++++++++---------
 15 files changed, 396 insertions(+), 170 deletions(-)

-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2018-05-16 11:28 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 10:38 [PATCH for-4.11 00/10] x86: Improvements and fixes to Spectre handling Andrew Cooper
2018-05-11 10:38 ` [PATCH 01/10] x86/spec_ctrl: Read MSR_ARCH_CAPABILITIES only once Andrew Cooper
2018-05-11 14:32   ` Konrad Rzeszutek Wilk
2018-05-14  9:23   ` Wei Liu
2018-05-11 10:38 ` [PATCH 02/10] x86/spec_ctrl: Express Xen's choice of MSR_SPEC_CTRL value as a variable Andrew Cooper
2018-05-14 10:15   ` Wei Liu
2018-05-11 10:38 ` [PATCH 03/10] x86/spec_ctrl: Merge bti_ist_info and use_shadow_spec_ctrl into spec_ctrl_flags Andrew Cooper
2018-05-14 15:13   ` Wei Liu
2018-05-11 10:38 ` [PATCH 04/10] x86/spec_ctrl: Fold the XEN_IBRS_{SET, CLEAR} ALTERNATIVES together Andrew Cooper
2018-05-14 15:20   ` Wei Liu
2018-05-11 10:38 ` [PATCH 05/10] x86/spec_ctrl: Rename bits of infrastructure to avoid NATIVE and VMEXIT Andrew Cooper
2018-05-14 15:21   ` Wei Liu
2018-05-11 10:38 ` [PATCH 06/10] x86/spec_ctrl: Split X86_FEATURE_SC_MSR into PV and HVM variants Andrew Cooper
2018-05-14 15:22   ` Wei Liu
2018-05-14 15:27   ` Jan Beulich
2018-05-15 19:52     ` Andrew Cooper
2018-05-16  6:38       ` Jan Beulich
2018-05-16 10:28         ` Andrew Cooper
2018-05-16 10:49           ` Jan Beulich
2018-05-16 10:56             ` Andrew Cooper
2018-05-11 10:38 ` [PATCH 07/10] x86/spec_ctrl: Explicitly set Xen's default MSR_SPEC_CTRL value Andrew Cooper
2018-05-14 15:39   ` Wei Liu
2018-05-14 15:52     ` Jan Beulich
2018-05-16 11:08       ` Andrew Cooper
2018-05-16 11:12         ` Wei Liu
2018-05-11 10:38 ` [PATCH 08/10] x86/cpuid: Improvements to guest policies for speculative sidechannel features Andrew Cooper
2018-05-11 10:38 ` [PATCH 09/10] x86/spec_ctrl: Introduce a new `spec-ctrl=` command line argument to replace `bti=` Andrew Cooper
2018-05-11 10:38 ` [PATCH 10/10] x86/spec_ctrl: Elide MSR_SPEC_CTRL handling in idle context when possible Andrew Cooper
2018-05-14 15:48   ` Wei Liu
2018-05-16 11:27     ` Andrew Cooper
2018-05-16 11:28       ` Wei Liu
2018-05-14  9:23 ` [PATCH for-4.11 00/10] x86: Improvements and fixes to Spectre handling Wei Liu
2018-05-14 15:31 ` Jan Beulich
2018-05-15 18:25 ` Juergen Gross

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.