[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/cpu-policy: Hide XSAVES from guests by default



There is a lot of work still required for Xen to support supervisor xstates,
and Xen does not permit any bits to be set in MSR_XSS.  This makes XSAVES
equivalent to XSAVEC.

In principle this is safe (and is how AMD Zen1/2 CPUs manifest in practice),
but Hyper-V objects to seeing XSAVES without the "enable XSAVES/XRSTORS"
secondary execution control on Intel systems.  The objection is legitimate,
and arises because nested virtualisation has seen no real work in more than a
decade.

We cannot viably fix the nested virt aspect before having regular support in
place, so hide XSAVES in the short term until support is in a better state.

Reported-by: Chunjie Zhu <chunjie.zhu@xxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
CC: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
 xen/include/public/arch-x86/cpufeatureset.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/public/arch-x86/cpufeatureset.h 
b/xen/include/public/arch-x86/cpufeatureset.h
index fb65548381ab..16423d18f533 100644
--- a/xen/include/public/arch-x86/cpufeatureset.h
+++ b/xen/include/public/arch-x86/cpufeatureset.h
@@ -181,7 +181,7 @@ XEN_CPUFEATURE(ADDR_MSK_EXT,  3*32+30) /*A  Address Mask 
Extentions */
 XEN_CPUFEATURE(XSAVEOPT,      4*32+ 0) /*A  XSAVEOPT instruction */
 XEN_CPUFEATURE(XSAVEC,        4*32+ 1) /*A  XSAVEC/XRSTORC instructions */
 XEN_CPUFEATURE(XGETBV1,       4*32+ 2) /*A  XGETBV with %ecx=1 */
-XEN_CPUFEATURE(XSAVES,        4*32+ 3) /*S  XSAVES/XRSTORS instructions */
+XEN_CPUFEATURE(XSAVES,        4*32+ 3) /*s  XSAVES/XRSTORS instructions */
 XEN_CPUFEATURE(XFD,           4*32+ 4) /*   MSR_XFD{,_ERR} (eXtended Feature 
Disable) */
 
 /* Intel-defined CPU features, CPUID level 0x00000007:0.ebx, word 5 */

base-commit: 091d3c200281ea44846ccdf1e5d39985321c643e
-- 
2.39.5




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.