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-unstable] x86: Further fixes for xsave leaf in pv_c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Further fixes for xsave leaf in pv_cpuid().
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 14 Oct 2011 18:00:15 +0100
Delivery-date: Fri, 14 Oct 2011 10:03:16 -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 Shan Haitao <haitao.shan@xxxxxxxxx>
# Date 1318517935 -3600
# Node ID bbde1453cbd95d6d36febe9c552f9cfa26b5c49e
# Parent  c1bd53fac3d5e5868352894d62dbacd6de0b0e7a
x86: Further fixes for xsave leaf in pv_cpuid().

Signed-off-by: Shan Haitao <haitao.shan@xxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r c1bd53fac3d5 -r bbde1453cbd9 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Oct 13 12:21:10 2011 +0100
+++ b/xen/arch/x86/traps.c      Thu Oct 13 15:58:55 2011 +0100
@@ -768,16 +768,18 @@
 
     if ( current->domain->domain_id != 0 )
     {
+        unsigned int cpuid_leaf = a, sub_leaf = c;
+
         if ( !cpuid_hypervisor_leaves(a, c, &a, &b, &c, &d) )
             domain_cpuid(current->domain, a, c, &a, &b, &c, &d);
 
-        switch ( a )
+        switch ( cpuid_leaf )
         {
         case 0xd:
         {
-            unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+            unsigned int _eax, _ebx, _ecx, _edx;
             /* EBX value of main leaf 0 depends on enabled xsave features */
-            if ( c == 0 && current->arch.xcr0 )
+            if ( sub_leaf == 0 && current->arch.xcr0 )
             {
                 /* reset EBX to default value first */
                 b = XSTATE_AREA_MIN_SIZE;
@@ -785,8 +787,8 @@
                 {
                     if ( !(current->arch.xcr0 & (1ULL << sub_leaf)) )
                         continue;
-                    domain_cpuid(current->domain, a, c, &_eax, &_ebx, &_ecx,
-                                 &_edx);
+                    domain_cpuid(current->domain, cpuid_leaf, sub_leaf,
+                                 &_eax, &_ebx, &_ecx, &_edx);
                     if ( (_eax + _ebx) > b )
                         b = _eax + _ebx;
                 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Further fixes for xsave leaf in pv_cpuid()., Xen patchbot-unstable <=