mbox series

[v2,0/9] x86: MSR_SPEC_CTRL support for SVM guests

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

Message

Andrew Cooper Jan. 28, 2022, 1:29 p.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 (9):
  x86/cpuid: Advertise SSB_NO to guests by default
  x86/spec-ctrl: Drop use_spec_ctrl boolean
  x86/spec-ctrl: Introduce new has_spec_ctrl boolean
  x86/spec-ctrl: Don't use spec_ctrl_{enter,exit}_idle() for S3
  x86/spec-ctrl: Record the last write to MSR_SPEC_CTRL
  x86/spec-ctrl: Use common MSR_SPEC_CTRL logic for AMD
  x86/svm: VMEntry/Exit logic for MSR_SPEC_CTRL
  x86/msr: AMD MSR_SPEC_CTRL infrastructure
  x86/cpuid: Enable MSR_SPEC_CTRL in SVM guests by default

 xen/arch/x86/acpi/power.c                   |  8 +++-
 xen/arch/x86/cpu/amd.c                      |  2 +-
 xen/arch/x86/cpuid.c                        | 16 +++++--
 xen/arch/x86/hvm/svm/entry.S                | 12 +++---
 xen/arch/x86/hvm/svm/svm.c                  | 40 +++++++++++++++++
 xen/arch/x86/include/asm/current.h          |  2 +-
 xen/arch/x86/include/asm/hvm/svm/svm.h      |  3 ++
 xen/arch/x86/include/asm/msr.h              |  9 ++++
 xen/arch/x86/include/asm/spec_ctrl_asm.h    |  7 +++
 xen/arch/x86/msr.c                          |  8 ++--
 xen/arch/x86/setup.c                        |  5 ++-
 xen/arch/x86/smpboot.c                      |  7 ++-
 xen/arch/x86/spec_ctrl.c                    | 66 ++++++++++++++++++++---------
 xen/include/public/arch-x86/cpufeatureset.h | 18 ++++----
 xen/tools/gen-cpuid.py                      | 14 +++---
 15 files changed, 166 insertions(+), 51 deletions(-)