[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.1-testing] svm: Can only avoid CR3 reads when NPT is enabled.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1191418997 -3600
# Node ID a05fefd41911fb2e4c4fd32f13147a5baa6820de
# Parent  092cbf1f4bf4e781f3809a33a8b89afa58296b2c
svm: Can only avoid CR3 reads when NPT is enabled.
CR0 and CR4 reads must still be intercepted.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   16054:479d83aa02caa9fa1d1ccecf355821eb3f5712bd
xen-unstable date:        Wed Oct 03 14:33:57 2007 +0100
xen-unstable changeset:   16055:33107700062c4442ac66866120d3cfb6bc87a229
xen-unstable date:        Wed Oct 03 14:41:28 2007 +0100
---
 xen/arch/x86/hvm/svm/vmcb.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -r 092cbf1f4bf4 -r a05fefd41911 xen/arch/x86/hvm/svm/vmcb.c
--- a/xen/arch/x86/hvm/svm/vmcb.c       Wed Oct 03 14:38:49 2007 +0100
+++ b/xen/arch/x86/hvm/svm/vmcb.c       Wed Oct 03 14:43:17 2007 +0100
@@ -239,14 +239,16 @@ static int construct_vmcb(struct vcpu *v
                     (HVM_CR4_HOST_MASK & ~X86_CR4_PAE);
         vmcb->exception_intercepts = HVM_TRAP_MASK;
 
-        /* No point in intercepting CR0/3/4 reads, because the hardware 
-         * will return the guest versions anyway. */
-        vmcb->cr_intercepts &= ~(CR_INTERCEPT_CR0_READ
-                                 |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 CR3 reads, because the hardware will return
+         * the guest version anyway.
+         */
+        vmcb->cr_intercepts &= ~CR_INTERCEPT_CR3_READ;
+
+        /*
+         * 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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.