direct-io.hg

changeset 13800:01ec7dba9ff8

Hide RDTSCP feature flag from PV guests.

Linux 2.6.19 (x86-64) makes use of this feature if available, but Xen
(validly) fails the attempt to write the respective MSR. Hence the
feature must be hidden from PV guests.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Fri Feb 02 16:07:13 2007 +0000 (2007-02-02)
parents 1e56ac73b9b9
children 7a7509570af9 fbc128aafdeb
files xen/arch/x86/traps.c xen/include/asm-x86/cpufeature.h
line diff
     1.1 --- a/xen/arch/x86/traps.c	Fri Feb 02 16:04:11 2007 +0000
     1.2 +++ b/xen/arch/x86/traps.c	Fri Feb 02 16:07:13 2007 +0000
     1.3 @@ -597,6 +597,11 @@ static int emulate_forced_invalid_op(str
     1.4          if ( !IS_PRIV(current->domain) )
     1.5              clear_bit(X86_FEATURE_MTRR, &d);
     1.6      }
     1.7 +    else if ( regs->eax == 0x80000001 )
     1.8 +    {
     1.9 +        /* Modify Feature Information. */
    1.10 +        clear_bit(X86_FEATURE_RDTSCP % 32, &d);
    1.11 +    }
    1.12      else
    1.13      {
    1.14          (void)cpuid_hypervisor_leaves(regs->eax, &a, &b, &c, &d);
     2.1 --- a/xen/include/asm-x86/cpufeature.h	Fri Feb 02 16:04:11 2007 +0000
     2.2 +++ b/xen/include/asm-x86/cpufeature.h	Fri Feb 02 16:07:13 2007 +0000
     2.3 @@ -49,6 +49,7 @@
     2.4  #define X86_FEATURE_MP		(1*32+19) /* MP Capable. */
     2.5  #define X86_FEATURE_NX		(1*32+20) /* Execute Disable */
     2.6  #define X86_FEATURE_MMXEXT	(1*32+22) /* AMD MMX extensions */
     2.7 +#define X86_FEATURE_RDTSCP	(1*32+27) /* RDTSCP */
     2.8  #define X86_FEATURE_LM		(1*32+29) /* Long Mode (x86-64) */
     2.9  #define X86_FEATURE_3DNOWEXT	(1*32+30) /* AMD 3DNow! extensions */
    2.10  #define X86_FEATURE_3DNOW	(1*32+31) /* 3DNow! */