diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-05-20 13:49:36 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-05-20 13:49:36 +0100 |
commit | ee58481b3e2d18d7b9256b8d72c85c568612c862 (patch) | |
tree | 17b58b6f52c9c48477895ee550c2fd6bd2014ad8 | |
parent | 9205fbd3b564f5467172dce06876dc13d09b04a8 (diff) | |
download | xen-ee58481b3e2d18d7b9256b8d72c85c568612c862.tar.gz xen-ee58481b3e2d18d7b9256b8d72c85c568612c862.tar.bz2 xen-ee58481b3e2d18d7b9256b8d72c85c568612c862.zip |
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@novell.com>
xen-unstable changeset: 23353:a768a10d32b4
xen-unstable date: Fri May 20 08:54:45 2011 +0100
-rw-r--r-- | xen/arch/x86/traps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 58fbaba82c..e69c43ed35 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -806,6 +806,10 @@ static void pv_cpuid(struct cpu_user_regs *regs) __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 */ |