ia64/xen-unstable

changeset 15601:a0f90312844d

[XEN] HAP: need to intercept CR0 even when using NPT
because we tinker with CR0.TS. Thanks to Wei Huang for pointing this out.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Mon Jul 16 10:36:52 2007 +0100 (2007-07-16)
parents 3052a8f07a18
children 1158b6115b14
files xen/arch/x86/hvm/svm/vmcb.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/vmcb.c	Sat Jul 14 10:26:02 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/vmcb.c	Mon Jul 16 10:36:52 2007 +0100
     1.3 @@ -239,11 +239,11 @@ static int construct_vmcb(struct vcpu *v
     1.4                      (HVM_CR4_HOST_MASK & ~X86_CR4_PAE);
     1.5          vmcb->exception_intercepts = HVM_TRAP_MASK;
     1.6  
     1.7 -        /* No point in intercepting CR0/3/4 reads, because the hardware 
     1.8 -         * will return the guest versions anyway. */
     1.9 -        vmcb->cr_intercepts &= ~(CR_INTERCEPT_CR0_READ
    1.10 -                                 |CR_INTERCEPT_CR3_READ
    1.11 -                                 |CR_INTERCEPT_CR4_READ);
    1.12 +        /* No point in intercepting CR3/4 reads, because the hardware 
    1.13 +         * will return the guest versions anyway.  Still need to intercept 
    1.14 +         * CR0 reads to hide the changes we make to CR0.TS in the lazy-fpu 
    1.15 +         * code. */
    1.16 +        vmcb->cr_intercepts &= ~(CR_INTERCEPT_CR3_READ|CR_INTERCEPT_CR4_READ);
    1.17  
    1.18          /* No point in intercepting INVLPG if we don't have shadow pagetables 
    1.19           * that need to be fixed up. */