[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/8] x86: MSR_SPEC_CTRL support for SVM guests
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Wed, 26 Jan 2022 08:44:44 +0000
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 26 Jan 2022 08:45:15 +0000
- Ironport-data: A9a23:c5WPrKLD63Ip5Fc2FE+RBZIlxSXFcZb7ZxGr2PjKsXjdYENS0DBTy GcbXW7Xbq2LamDye9F0Po238EoFvJ+HnYM3GgJlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUakideSc+EH170Us5xbZg6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB3WmMBz6 +RqjqWBWBwqP7Pvp7RAYRlhRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFFgMg5IdatF4QYonx6lhnSDOo8QICFSKLPjTNd9Glr35AfQ6mFD yYfQT80Zj7aaidyBlk4OsMejOr1hGHwVDIN/Tp5ooJoujOOnWSdyoPFL979atGMA8JPkS6wh EjL4mD4CREyL8GExHyO9XfErv/Cm2b3VZwfEJW89+V2mxuDy2oLEhoUWFCn5/6jhSaDt8l3c hJOvHB09O5rqRLtHoKVswCETGCs4RkMWflhNNYD2RCWyavKwDnJW1oEd2sUAD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Ironport-sdr: QWC+k+WygnbngbDBS26n46/vFR3gtE542BktanjWeznBOJh97UztpXgjSG5V4tCiGxLV35Bopz 2f3JUrMLfUeF7LB7UhKCZTvFJnbc8raPyX6q2IVgGQZFzfpWc9siTnRvQK70m5LjjN+Xf76O4w xHZQ5b7kScD5dlwQRPg4v42ouMRVkO5Rx0C64SIUGnPk2Kh1SNSAoFwYzqc+4XcxVBnc2LtOoP BV9WnPWlYXY/aI/dLDogn5Y1jdqpD6b6KJc8PIi5r3UQiFA8kwzbwr2/Cca1fptFsXpYihDclO 9cp3Bt73uev712/L9G/R5Rp1
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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(-)
--
2.11.0
|