mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
This commit is contained in:
1 parent
70f30bb437
commit
89ed067cfd
1 file changed
+4
@@ -837,6 +837,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 */
|
||||
|
||||