WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.1-testing] libxc: Fill in XSAVE-related CPUID lea

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] libxc: Fill in XSAVE-related CPUID leaves for PV guests.
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Tue, 26 Apr 2011 11:35:16 +0100
Delivery-date: Tue, 26 Apr 2011 03:36:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1303741713 -3600
# Node ID 7361cc362d642e73b49c319e2263d6b4fe2fe011
# Parent  ff57766584b9bdb6480eab3256ec40ad5cba27cf
libxc: Fill in XSAVE-related CPUID leaves for PV guests.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   23248:16aac67e948c
xen-unstable date:        Mon Apr 25 15:27:56 2011 +0100
---


diff -r ff57766584b9 -r 7361cc362d64 tools/libxc/xc_cpuid_x86.c
--- a/tools/libxc/xc_cpuid_x86.c        Mon Apr 25 13:38:51 2011 +0100
+++ b/tools/libxc/xc_cpuid_x86.c        Mon Apr 25 15:28:33 2011 +0100
@@ -355,8 +355,9 @@
     const unsigned int *input, unsigned int *regs)
 {
     DECLARE_DOMCTL;
-    int guest_64bit, xsave_supported, xen_64bit = hypervisor_is_64bit(xch);
+    int guest_64bit, xen_64bit = hypervisor_is_64bit(xch);
     char brand[13];
+    uint64_t xfeature_mask;
 
     xc_cpuid_brand_get(brand);
 
@@ -371,7 +372,7 @@
     domctl.cmd = XEN_DOMCTL_getvcpuextstate;
     domctl.domain = domid;
     do_domctl(xch, &domctl);
-    xsave_supported = (domctl.u.vcpuextstate.xfeature_mask != 0);
+    xfeature_mask = domctl.u.vcpuextstate.xfeature_mask;
 
     if ( (input[0] & 0x7fffffff) == 1 )
     {
@@ -402,7 +403,7 @@
         clear_bit(X86_FEATURE_TM2, regs[2]);
         if ( !guest_64bit )
             clear_bit(X86_FEATURE_CX16, regs[2]);
-        if ( !xsave_supported )
+        if ( xfeature_mask == 0 )
         {
             clear_bit(X86_FEATURE_XSAVE, regs[2]);
             clear_bit(X86_FEATURE_AVX, regs[2]);
@@ -412,6 +413,11 @@
         clear_bit(X86_FEATURE_DCA, regs[2]);
         set_bit(X86_FEATURE_HYPERVISOR, regs[2]);
         break;
+
+    case 0x0000000d:
+        xc_cpuid_config_xsave(xch, domid, xfeature_mask, input, regs);
+        break;
+
     case 0x80000001:
         if ( !guest_64bit )
         {
@@ -436,9 +442,9 @@
         clear_bit(X86_FEATURE_NODEID_MSR, regs[2]);
         clear_bit(X86_FEATURE_TOPOEXT, regs[2]);
         break;
+
     case 5: /* MONITOR/MWAIT */
     case 0xa: /* Architectural Performance Monitor Features */
-    case 0xd: /* XSAVE */
     case 0x8000000a: /* SVM revision and features */
     case 0x8000001b: /* Instruction Based Sampling */
     case 0x8000001c: /* Light Weight Profiling */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] libxc: Fill in XSAVE-related CPUID leaves for PV guests., Xen patchbot-4 . 1-testing <=