Skip to content

xen/amd: Support for guest MSR_VIRT_SPEC_CTRL support

Andrew Cooper xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 41 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9x86/spec-ctrl: Drop the bti= command line optiondocs/misc/xen-command-line.markdown xen/arch/x86/spec_ctrl.c+0 -911 reply
2/9x86/cpuid: Drop the synthetic X86_FEATURE_XEN_IBPBxen/include/asm-x86/cpufeatures.h+0 -11 reply
3/9x86/cpuid: Extend the cpuid= command line option to support all named featuresxen/arch/x86/cpuid.c xen/tools/gen-cpuid.py+86 -272 replies
4/9x86/amd: Introduce CPUID/MSR definitions for per-vcpu SSBD supporttools/libxl/libxl_cpuid.c tools/misc/xen-cpuid.c xen/arch/x86/spec_ctrl.c +2 more+23 -15 replies
5/9x86/amd: Probe for legacy SSBD interfaces on bootxen/arch/x86/cpu/amd.c xen/arch/x86/spec_ctrl.c xen/include/asm-x86/cpufeature.h +1 more+68 -17 replies
6/9x86/amd: Allocate resources to cope with LS_CFG being per-core on Fam17hxen/arch/x86/cpu/amd.c+91 -07 replies
7/9x86/amd: Support context switching legacy SSBD interfacexen/arch/x86/cpu/amd.c xen/arch/x86/smpboot.c xen/include/asm-x86/processor.h+75 -194 replies
8/9x86/amd: Virtualise MSR_VIRT_SPEC_CTRL for guestsdocs/misc/xen-command-line.markdown xen/arch/x86/cpu/amd.c xen/arch/x86/domain.c +4 more+42 -56 replies
9/9x86/amd: Offer MSR_VIRT_SPEC_CTRL to guestsxen/arch/x86/cpuid.c xen/include/public/arch-x86/cpufeatureset.h+11 -11 reply

Reviews trailers per patch

5 of 9 patches have a Reviewed-by or Acked-by.

PatchBrian WoodsJan Beulich
1/9A-b
2/9R-b
3/9
4/9Reviewd-by
5/9Reviewd-by
6/9R-b
7/9R-b
8/9R-b
9/9

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

Read the v1 thread

Cover letter [PATCH 0/9] xen/amd: Support for guest MSR_VIRT_SPEC_CTRL support

This is a lingering TODO item from XSA-263. It adds support AMD's MSR_VIRT_SPEC_CTRL interface, and changes Xen's "boot time global" SSBD setting into a per-vcpu setting.

This can be found on:
git://xenbits.xen.org/people/andrewcoop/xen.git xen-virt-spec-ctrl-v1

The start of the series is some cleanup. It then teaches Xen to recognise the available interfaces (including MSR_VIRT_SPEC_CTRL from a hypervisor), then how to safely context switch the per-core LS_CFG on Fam17h, an finally to expose support to guests.

I've got some further MSR work coming because we have to fix the default-leakiness of MSRs in this range, because a guest becomes unsafe to migrate as soon as it reads any of the pipeline control MSRs.

Andrew Cooper (9):
x86/spec-ctrl: Drop the bti= command line option
x86/cpuid: Drop the synthetic X86_FEATURE_XEN_IBPB
x86/cpuid: Extend the cpuid= command line option to support all named features x86/amd: Introduce CPUID/MSR definitions for per-vcpu SSBD support x86/amd: Probe for legacy SSBD interfaces on boot
x86/amd: Allocate resources to cope with LS_CFG being per-core on Fam17h x86/amd: Support context switching legacy SSBD interface
x86/amd: Virtualise MSR_VIRT_SPEC_CTRL for guests
x86/amd: Offer MSR_VIRT_SPEC_CTRL to guests

 docs/misc/xen-command-line.markdown         |  47 ++----
 tools/libxl/libxl_cpuid.c                   |   5 +
 tools/misc/xen-cpuid.c                      |   4 +
 xen/arch/x86/cpu/amd.c                      | 239 +++++++++++++++++++++++++---
 xen/arch/x86/cpuid.c                        | 101 +++++++++---
 xen/arch/x86/domain.c                       |   2 +
 xen/arch/x86/domctl.c                       |   1 +
 xen/arch/x86/hvm/hvm.c                      |   1 +
 xen/arch/x86/msr.c                          |  17 ++
 xen/arch/x86/smpboot.c                      |   3 +
 xen/arch/x86/spec_ctrl.c                    |  67 +-------
 xen/include/asm-x86/cpufeature.h            |   6 +
 xen/include/asm-x86/cpufeatures.h           |   2 +-
 xen/include/asm-x86/msr-index.h             |   3 +
 xen/include/asm-x86/msr.h                   |   9 ++
 xen/include/asm-x86/processor.h             |   2 +
 xen/include/public/arch-x86/cpufeatureset.h |   5 +
 xen/tools/gen-cpuid.py                      |  22 ++-
 18 files changed, 393 insertions(+), 143 deletions(-)
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel