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

[Xen-changelog] [xen master] tools/libxc: Add xstate cpuid leaf of avx512



commit a0e98991b0407527b3d2ce1a6eeeb095e1fbf4a7
Author:     Luwei Kang <luwei.kang@xxxxxxxxx>
AuthorDate: Fri Nov 4 16:29:18 2016 +0800
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Nov 4 14:06:47 2016 +0000

    tools/libxc: Add xstate cpuid leaf of avx512
    
    Enable get xstate cpuid leaf information regarding avx512 in guest.
    
    Signed-off-by: Luwei Kang <luwei.kang@xxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxc/xc_cpuid_x86.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index de06b32..d761805 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -406,6 +406,9 @@ static void intel_xc_cpuid_policy(xc_interface *xch,
 #define X86_XCR0_AVX    (1ULL <<  2)
 #define X86_XCR0_BNDREG (1ULL <<  3)
 #define X86_XCR0_BNDCSR (1ULL <<  4)
+#define X86_XCR0_OPMASK (1ULL <<  5)
+#define X86_XCR0_ZMM    (1ULL <<  6)
+#define X86_XCR0_HI_ZMM (1ULL <<  7)
 #define X86_XCR0_PKRU   (1ULL <<  9)
 #define X86_XCR0_LWP    (1ULL << 62)
 
@@ -437,6 +440,9 @@ static void xc_cpuid_config_xsave(xc_interface *xch,
     if ( test_bit(X86_FEATURE_MPX, info->featureset) )
         guest_xfeature_mask |= X86_XCR0_BNDREG | X86_XCR0_BNDCSR;
 
+    if ( test_bit(X86_FEATURE_AVX512F, info->featureset) )
+        guest_xfeature_mask |= X86_XCR0_OPMASK | X86_XCR0_ZMM | 
X86_XCR0_HI_ZMM;
+
     if ( test_bit(X86_FEATURE_PKU, info->featureset) )
         guest_xfeature_mask |= X86_XCR0_PKRU;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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