ia64/xen-unstable

changeset 9295:96ba0a2bc9de

Remove unnecessary cr4 handling in vmx_set_cr0.
1) on x86_32, PAE should never be enabled in guest cr4, since we only
support pure IA32 VMX guest.
2) on x86_32p or x86_64, PAE should always be enabled in guest cr4,
since even pure IA32 guest uses PAE paging mode actually.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Mar 15 13:35:43 2006 +0100 (2006-03-15)
parents 9af36c14ae83
children f85bb99187bf
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Mar 15 12:24:59 2006 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Mar 15 13:35:43 2006 +0100
     1.3 @@ -1219,8 +1219,6 @@ static int vmx_set_cr0(unsigned long val
     1.4  
     1.5      if ( (value & X86_CR0_PE) && (value & X86_CR0_PG) && !paging_enabled )
     1.6      {
     1.7 -        unsigned long cr4;
     1.8 -
     1.9          /*
    1.10           * Trying to enable guest paging.
    1.11           * The guest CR3 must be pointing to the guest physical.
    1.12 @@ -1271,16 +1269,6 @@ static int vmx_set_cr0(unsigned long val
    1.13  #endif
    1.14          }
    1.15  
    1.16 -        /* update CR4's PAE if needed */
    1.17 -        __vmread(GUEST_CR4, &cr4);
    1.18 -        if ( (!(cr4 & X86_CR4_PAE)) &&
    1.19 -             test_bit(VMX_CPU_STATE_PAE_ENABLED,
    1.20 -                      &v->arch.hvm_vmx.cpu_state) )
    1.21 -        {
    1.22 -            HVM_DBG_LOG(DBG_LEVEL_1, "enable PAE in cr4\n");
    1.23 -            __vmwrite(GUEST_CR4, cr4 | X86_CR4_PAE);
    1.24 -        }
    1.25 -
    1.26          /*
    1.27           * Now arch.guest_table points to machine physical.
    1.28           */