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

[Xen-changelog] [xen-unstable] [XEN] HAP: need to intercept CR0 even when using NPT



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1184578612 -3600
# Node ID a0f90312844d77fc28b4c2f9ccf5fed22cf68581
# Parent  3052a8f07a182015796ec755fecf0cfe4af8eaed
[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@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/vmcb.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 3052a8f07a18 -r a0f90312844d xen/arch/x86/hvm/svm/vmcb.c
--- a/xen/arch/x86/hvm/svm/vmcb.c       Sat Jul 14 10:26:02 2007 +0100
+++ b/xen/arch/x86/hvm/svm/vmcb.c       Mon Jul 16 10:36:52 2007 +0100
@@ -239,11 +239,11 @@ 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 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. */
+        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. */

_______________________________________________
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®.