ia64/xen-unstable

changeset 12649:15e80a946a6a

[HVM][VMX] NX bit implies PAE can be enabled. If IA32 VMX guest finds
NX bit is there, it may enable PAE even if PAE bit is returned 0 by
CPUID.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
author kfraser@localhost.localdomain
date Wed Nov 29 11:07:51 2006 +0000 (2006-11-29)
parents f69c4a275d4d
children 8832712b0b37
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Nov 29 10:58:35 2006 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Nov 29 11:07:51 2006 +0000
     1.3 @@ -878,15 +878,19 @@ static void vmx_do_cpuid(struct cpu_user
     1.4          {
     1.5              eax = ebx = ecx = edx = 0x0;
     1.6          }
     1.7 -#ifdef __i386__
     1.8          else if ( input == CPUID_LEAF_0x80000001 )
     1.9          {
    1.10 +#if CONFIG_PAGING_LEVELS >= 3
    1.11 +            if ( !v->domain->arch.hvm_domain.params[HVM_PARAM_PAE_ENABLED] )
    1.12 +#endif
    1.13 +                clear_bit(X86_FEATURE_NX & 31, &edx);
    1.14 +#ifdef __i386__
    1.15              clear_bit(X86_FEATURE_LAHF_LM & 31, &ecx);
    1.16  
    1.17              clear_bit(X86_FEATURE_LM & 31, &edx);
    1.18              clear_bit(X86_FEATURE_SYSCALL & 31, &edx);
    1.19 +#endif
    1.20          }
    1.21 -#endif
    1.22      }
    1.23  
    1.24      regs->eax = (unsigned long) eax;