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

Andrew Cooper posted 4 patches 2 years, 3 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220117183415.11150-1-andrew.cooper3@citrix.com
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(-)
[PATCH v2 0/4] x86/spec-ctrl: Fix NMI race condition
Posted by Andrew Cooper 2 years, 3 months ago
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(-)

-- 
2.11.0