Skip to content

x86/spec-ctrl: Fix NMI race condition

Andrew Cooper xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 13 repliesIn review
  2. v13 patches 20 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/guest: Introduce {get,set}_reg() infrastructurexen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/vmx/vmx.c +3 more+151 -02 replies
2/4x86/msr: Split MSR_SPEC_CTRL handlingxen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/msr.c xen/arch/x86/pv/emulate.c+33 -41 reply
3/4x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVMxen/arch/x86/hvm/svm/entry.S xen/arch/x86/hvm/vmx/entry.S xen/arch/x86/include/asm/spec_ctrl_asm.h+13 -190 replies
4/4x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handlingxen/arch/x86/hvm/vmx/entry.S xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/include/asm/msr.h +1 more+67 -406 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRoger Pau MonnéJan Beulich
SeriesR-b
1/4R-b
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] x86/spec-ctrl: Fix NMI race condition

v1 had an irritating breakage with VM migration, caused by the accessor logic moving out of guest_{rd,wr}msr(). v2 takes an approach I'd previously put off to one side, but which appears to be the least invasive way forward.

Andrew Cooper (4):
x86/guest: Introduce {get,set}_reg() infrastructure x86/msr: Split MSR_SPEC_CTRL handling
x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM x86/spec-ctrl: Fix NMI race condition with VT-x MSR_SPEC_CTRL handling

 xen/arch/x86/hvm/hvm.c                   | 22 +++++++++
 xen/arch/x86/hvm/svm/entry.S             |  5 +-
 xen/arch/x86/hvm/svm/svm.c               | 30 ++++++++++++
 xen/arch/x86/hvm/vmx/entry.S             | 23 +++++++---
 xen/arch/x86/hvm/vmx/vmx.c               | 78 +++++++++++++++++++++++++++++++-
 xen/arch/x86/include/asm/hvm/hvm.h       | 24 ++++++++++
 xen/arch/x86/include/asm/msr.h           | 10 +++-
 xen/arch/x86/include/asm/pv/domain.h     | 13 ++++++
 xen/arch/x86/include/asm/spec_ctrl_asm.h | 51 ++++-----------------
 xen/arch/x86/msr.c                       | 21 +++++++--
 xen/arch/x86/pv/emulate.c                | 40 ++++++++++++++++
 11 files changed, 259 insertions(+), 58 deletions(-)
Signature · 1 line
2.11.0