ia64/xen-unstable

changeset 10646:8468860cc8de

[HVM][VMX] expose PSE feature to HVM guests if PAE is turned on in
config file, with this change, RHEL4 IA32 SMP guest can boot.
But because we don't support 4Mbytes PSE pages, so x86_32 HVM guest
can NOT use PSE feature. However user may have "pae=1" in config file,
which causes PSE feature seen by x86_32 HVM guest, and it will then use
4Mbytes PSE pages. In this case, we will have to crash x86_32 HVM.
So when running x86_32 HVM guest, user need pay attention not to have
"pae=1" in config file.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
author kfraser@localhost.localdomain
date Wed Jul 05 10:32:08 2006 +0100 (2006-07-05)
parents fd6d12935b56
children 4d2354be4aa6
files xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/shadow.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Mon Jul 03 16:07:20 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jul 05 10:32:08 2006 +0100
     1.3 @@ -857,10 +857,14 @@ static void vmx_vmexit_do_cpuid(struct c
     1.4  #else
     1.5              if ( v->domain->arch.ops->guest_paging_levels == PAGING_L2 )
     1.6              {
     1.7 -                if ( !v->domain->arch.hvm_domain.pae_enabled )
     1.8 +                if ( v->domain->arch.hvm_domain.pae_enabled )
     1.9 +                    clear_bit(X86_FEATURE_PSE36, &edx);
    1.10 +                else
    1.11 +                {
    1.12                      clear_bit(X86_FEATURE_PAE, &edx);
    1.13 -                clear_bit(X86_FEATURE_PSE, &edx);
    1.14 -                clear_bit(X86_FEATURE_PSE36, &edx);
    1.15 +                    clear_bit(X86_FEATURE_PSE, &edx);
    1.16 +                    clear_bit(X86_FEATURE_PSE36, &edx);
    1.17 +                }
    1.18              }
    1.19  #endif
    1.20  
     2.1 --- a/xen/arch/x86/shadow.c	Mon Jul 03 16:07:20 2006 +0100
     2.2 +++ b/xen/arch/x86/shadow.c	Wed Jul 05 10:32:08 2006 +0100
     2.3 @@ -3724,7 +3724,13 @@ static inline int guest_page_fault(
     2.4      }
     2.5  
     2.6      if ( guest_l2e_get_flags(*gpl2e) & _PAGE_PSE )
     2.7 +    {
     2.8 +        printk("None-PAE HVM guests can NOT use PSE, "
     2.9 +               "because we don't support 4MBytes PSE pages.\n");
    2.10 +        printk("remove pae=1 from your config file.\n");
    2.11 +        domain_crash_synchronous();
    2.12          return 0;
    2.13 +    }
    2.14  
    2.15      __guest_get_l1e(v, va, gpl1e);
    2.16