diff options
author | Keir Fraser <keir@xen.org> | 2011-05-20 13:56:31 +0100 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-05-20 13:56:31 +0100 |
commit | d8a3f7243c7549e76ea14a19fa8d134212ef6910 (patch) | |
tree | 02aff0a17c853bdb20e3f8aecebf9e841107fe10 | |
parent | fcf125cdcd66310380452d46ab9a5c427aae60db (diff) | |
download | xen-d8a3f7243c7549e76ea14a19fa8d134212ef6910.tar.gz xen-d8a3f7243c7549e76ea14a19fa8d134212ef6910.tar.bz2 xen-d8a3f7243c7549e76ea14a19fa8d134212ef6910.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
Make this unconditional for 4.0 (no pv xsave support) and fix for domU
guests as well (this was already okay in 4.1 and later).
Signed-off-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | tools/libxc/xc_cpuid_x86.c | 1 | ||||
-rw-r--r-- | xen/arch/x86/traps.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index ebb0ef6118..f275b9e9e8 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -345,6 +345,7 @@ static void xc_cpuid_pv_policy( clear_bit(X86_FEATURE_NODEID_MSR, regs[2]); clear_bit(X86_FEATURE_TOPOEXT, regs[2]); break; + case 0xd: /* XSAVE */ case 5: /* MONITOR/MWAIT */ case 0xa: /* Architectural Performance Monitor Features */ case 0x8000000a: /* SVM revision and features */ diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 53c240c69e..f56b02680f 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -817,6 +817,7 @@ 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 */ case 5: /* MONITOR/MWAIT */ case 0xa: /* Architectural Performance Monitor Features */ case 0x8000000a: /* SVM revision and features */ |