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

[Xen-changelog] [xen-unstable] x86: clear CPUID output of leaf 0xd for Dom0 when xsave is disabled



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1305878085 -3600
# Node ID a768a10d32b4b85e29face84de2676b37bc0f673
# Parent  ea48976517af58e75a1bd71d5dbe6f481e518c17
x86: clear CPUID output of leaf 0xd for Dom0 when xsave is disabled

Linux starting with 2.6.36 uses the XSAVEOPT instruction and has
certain code paths that look only at the feature bit reported through
CPUID leaf 0xd sub-leaf 1 (i.e. without qualifying the check with one
evaluating leaf 4 output). Consequently the hypervisor ought to mimic
actual hardware in clearing leaf 0xd output when not supporting xsave.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---


diff -r ea48976517af -r a768a10d32b4 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Fri May 20 08:52:22 2011 +0100
+++ b/xen/arch/x86/traps.c      Fri May 20 08:54:45 2011 +0100
@@ -837,6 +837,10 @@
         __clear_bit(X86_FEATURE_NODEID_MSR % 32, &c);
         __clear_bit(X86_FEATURE_TOPOEXT % 32, &c);
         break;
+    case 0xd: /* XSAVE */
+        if ( xsave_enabled(current) )
+            break;
+        /* fall through */
     case 5: /* MONITOR/MWAIT */
     case 0xa: /* Architectural Performance Monitor Features */
     case 0x8000000a: /* SVM revision and features */

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


 


Rackspace

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