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-devel

[Xen-devel] [Patch] Fix CPUID leaf 7 syntax in XEN

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Patch] Fix CPUID leaf 7 syntax in XEN
From: "Yang, Wei Y" <wei.y.yang@xxxxxxxxx>
Date: Fri, 27 May 2011 22:19:56 +0800
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Fri, 27 May 2011 17:10:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acwcd8dr6M0jSZU2Sd+NLcuViwgBfgAADsmgAAAbqOA=
Thread-topic: [Patch] Fix CPUID leaf 7 syntax in XEN
This patch fixes CPUID leaf 7 syntax in Xen, which needs to set sub leaf to 0 
(input ECX=0).

Signed-off-by: Yang, Wei <wei.y.yang@xxxxxxxxx>
Signed-off-by: Li, Xin <xin.li@xxxxxxxxx>

common.c |    7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff -r 88fe9f780b3d -r 3ffa6082b9a0 xen/arch/x86/cpu/common.c
--- a/xen/arch/x86/cpu/common.c Thu May 26 17:16:47 2011 +0100
+++ b/xen/arch/x86/cpu/common.c Sat May 28 06:02:37 2011 +0800
@@ -263,8 +263,11 @@
 
        /* Intel-defined flags: level 0x00000007 */
        if ( c->cpuid_level >= 0x00000007 )
-               c->x86_capability[X86_FEATURE_FSGSBASE / 32]
-                       = cpuid_ebx(0x00000007);
+        {
+                u32 dummy;
+                cpuid_count(0x00000007, 0, &dummy, &ebx, &dummy, &dummy);
+                c->x86_capability[X86_FEATURE_FSGSBASE / 32] = ebx;
+        }
 
        early_intel_workaround(c);


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [Patch] Fix CPUID leaf 7 syntax in XEN, Yang, Wei Y <=