]> xenbits.xensource.com Git - xen.git/commitdiff
svm: Can only avoid CR3 reads when NPT is enabled.
authorKeir Fraser <keir@xensource.com>
Wed, 3 Oct 2007 13:33:57 +0000 (14:33 +0100)
committerKeir Fraser <keir@xensource.com>
Wed, 3 Oct 2007 13:33:57 +0000 (14:33 +0100)
CR0 and CR4 reads must still be intercepted.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/svm/vmcb.c

index d7de03d1cbdb88780cfe3f85f32adb6b5282b17f..497e6e0cdaa5e9a928c6cc30ace6a182dea3e151 100644 (file)
@@ -235,14 +235,16 @@ static int construct_vmcb(struct vcpu *v)
         vmcb->h_cr3 = pagetable_get_paddr(v->domain->arch.phys_table);
         vmcb->exception_intercepts = HVM_TRAP_MASK;
 
-        /* No point in intercepting CR3/4 reads, because the hardware 
-         * will return the guest versions anyway.  Still need to intercept 
-         * CR0 reads to hide the changes we make to CR0.TS in the lazy-fpu 
-         * code. */
+        /*
+         * No point in intercepting CR3 reads, because the hardware will return
+         * the guest version anyway.
+         */
         vmcb->cr_intercepts &= ~(CR_INTERCEPT_CR3_READ|CR_INTERCEPT_CR4_READ);
 
-        /* No point in intercepting INVLPG if we don't have shadow pagetables 
-         * that need to be fixed up. */
+        /*
+         * No point in intercepting INVLPG if we don't have shadow pagetables
+         * that need to be fixed up.
+         */
         vmcb->general1_intercepts &= ~GENERAL1_INTERCEPT_INVLPG;
     }
     else