ia64/xen-unstable

changeset 15732:00aa18fd722e

hvm: Fix %cr4 handling in HAP paging mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Aug 08 13:18:07 2007 +0100 (2007-08-08)
parents 35337d5c83f9
children 359707941ae8
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Wed Aug 08 12:27:23 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Wed Aug 08 13:18:07 2007 +0100
     1.3 @@ -585,9 +585,10 @@ int hvm_set_cr4(unsigned long value)
     1.4  
     1.5      old_cr = v->arch.hvm_vcpu.guest_cr[4];
     1.6      v->arch.hvm_vcpu.guest_cr[4] = value;
     1.7 -    v->arch.hvm_vcpu.hw_cr[4] = value | HVM_CR4_HOST_MASK;
     1.8 +    v->arch.hvm_vcpu.hw_cr[4] = HVM_CR4_HOST_MASK;
     1.9      if ( paging_mode_hap(v->domain) )
    1.10          v->arch.hvm_vcpu.hw_cr[4] &= ~X86_CR4_PAE;
    1.11 +    v->arch.hvm_vcpu.hw_cr[4] |= value;
    1.12      hvm_update_guest_cr(v, 4);
    1.13    
    1.14      /* Modifying CR4.{PSE,PAE,PGE} invalidates all TLB entries, inc. Global. */