mbox series

[0/8] x86: MSR_SPEC_CTRL support for SVM guests

Message ID 20220126084452.28975-1-andrew.cooper3@citrix.com (mailing list archive)
Headers show
Series x86: MSR_SPEC_CTRL support for SVM guests | expand

Message

Andrew Cooper Jan. 26, 2022, 8:44 a.m. UTC
Fixes/extensions to allow HVM guests to use AMD hardware MSR_SPEC_CTRL
facilities.

No PV support yet - that will require some substantially more careful
unpicking of the PV entry/exit asm.

Andrew Cooper (8):
  x86/msr: Fix migration compatibility issue with MSR_SPEC_CTRL
  x86/boot: Collect AMD speculative features earlier during boot
  x86/svm: VMEntry/Exit logic for MSR_SPEC_CTRL
  x86/spec-ctrl: Drop use_spec_ctrl boolean
  x86/spec-ctrl: Introduce new has_spec_ctrl boolean
  x86/spec-ctrl: Use common MSR_SPEC_CTRL logic for AMD
  x86/msr: AMD MSR_SPEC_CTRL infrastructure
  x86/cpuid: Enable MSR_SPEC_CTRL in SVM guests by default

 xen/arch/x86/cpu/amd.c                      |  2 +-
 xen/arch/x86/cpu/common.c                   | 15 +++++---
 xen/arch/x86/cpuid.c                        | 16 ++++++---
 xen/arch/x86/hvm/hvm.c                      | 25 +++++++++++--
 xen/arch/x86/hvm/svm/entry.S                | 10 +++---
 xen/arch/x86/hvm/svm/svm.c                  | 39 ++++++++++++++++++++
 xen/arch/x86/include/asm/current.h          |  2 +-
 xen/arch/x86/include/asm/msr.h              | 11 ++++++
 xen/arch/x86/include/asm/spec_ctrl_asm.h    |  7 ++++
 xen/arch/x86/msr.c                          | 37 ++++++++++++-------
 xen/arch/x86/spec_ctrl.c                    | 56 ++++++++++++++++++++---------
 xen/include/public/arch-x86/cpufeatureset.h | 18 +++++-----
 xen/tools/gen-cpuid.py                      |  5 +++
 13 files changed, 187 insertions(+), 56 deletions(-)