[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/9] x86: MSR_SPEC_CTRL support for SVM guests
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Fri, 28 Jan 2022 13:29:18 +0000
- Authentication-results: esa2.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: Fri, 28 Jan 2022 13:30:05 +0000
- Ironport-data: A9a23:btyenKKJMayEXwgMFE+RBZIlxSXFcZb7ZxGr2PjKsXjdYENSgjICn zQeUGmAaPyCa2r1ft4kPY7g8UtS68XUztRnSQJlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUakideSc+EH170Us5y7Zl6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB25nOAqz egOvqbpRA4NYKPotu0tdzhhRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFFgMg5IdatF4QYonx6lhnSDOo8QICFSKLPjTNd9Glq15AXQ6+FD yYfQSNCZk/PbhFPAHw4T4s1lfuJxV3gTTIN/Tp5ooJoujOOnWSdyoPFL979atGMA8JPkS6wh EjL4mD4CREyL8GExHyO9XfErv/Cm2b3VZwfEJW89+V2mxuDy2oLEhoUWFCn5/6jhSaDt8l3c hJOvHB09O5rqRLtHoKVswCETGCsjh0sAN9tUOYAsQyE7vTaxyiQNkwld2sUADA5j/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LlvhBQpHZRGsVdBmlCe2SmO3wzYDMDKYsyFZ Ka6MYCjSGnY24rYsOyAWRAd/TfpvXQ/aiWLiIuNloC0k2jnDmo4Ln1H1yzxREFSQ5Cxr8k7C zsjxH53KO+qPu2oyWsmVM7rq4m2ecJ+OEzR/BkufJlaAkETTzYIbiJbofy/AzdZtvfrGrC3u O85CvIdP4Dl085NlvF3icFnTOQnAoG2jva0lmfjmLkocvlABwHK+cpv/MeTjLpr3M6utdyya RK2H/ckaF2I1fvoATRjuK4Di2DsCKP0CEfeCoo/iRieJpbZ7lLoYMF+kRJVJ8GASLh8YgiVP JjFcfG+Z9tABqnhl3izx5SKeaXLwIO99a9Mzs/k93Q1yITkGFyzkMeysBalnAc9IglQ50B4+ jfKKxnmLxHU8dTNMtGdaw8aNryDnaITQPHMWqUL1iiHKYbO2jVo5qy5Lku/umldJEB0ZN3kp XcV1FTs3I0ZivVeIWz9YwO9gqITHS2XDzrxM0b759luqfkTL6uKiGHQEBGqbrVnxzeOLyvZx +eAuMmPxbTFxqdJW8S5XyBZ3B7EwhvbPEo
- Ironport-sdr: piDLzOU5VEiQ3+JIHjzXHS/8OU/Vg2LGWyleCFplUSAavkOdDdXOG1mKvwBI/Zve0YorWJWkyw 39Xxr9U02x0D9XoWC+cFLQO0LATY2XtLesgnDeP4i0/F7LIOpT8PHMpOJnLXVczgUJQmsZH6IA uxA4YfwmJdHwA8wnnWGK7WTgMkoxVHwwKRfxSL5z7//VYfkdpegV/6jUJG3u/ad5QX7B+cp9x7 2wQhAmri11SITSsHB1N0hsEySLfpCtEY76oWMKGHxEyBkAcjeGoUKVgShdRXStzhF7EWr5+t47 dUVRqtEzowHwXJEjlOs7cqsy
- 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 (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(-)
--
2.11.0
|