WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Not call paging_update_cr3(v) when guest reads from CR3?

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Not call paging_update_cr3(v) when guest reads from CR3?
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Wed, 11 Apr 2007 23:57:41 +0800
Delivery-date: Wed, 11 Apr 2007 08:56:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acd8UiL80dhBhpUxST6nnF8yGupjvg==
Thread-topic: Not call paging_update_cr3(v) when guest reads from CR3?
Hi Tim, 
I think it's not necessary to call paging_update_cr3(v) when guest reads
from CR3, am I right?
Thanks
-Xin


diff -r 38204c93428e xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Apr 11 16:08:35 2007 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Apr 11 22:27:35 2007 +0800
@@ -2103,16 +2103,14 @@ static int mov_to_cr(int gp, int cr, str
         /*
          * We make a new one if the shadow does not exist.
          */
-        if (value == v->arch.hvm_vmx.cpu_cr3) {
+        if ( value == v->arch.hvm_vmx.cpu_cr3 ) {
             /*
              * This is simple TLB flush, implying the guest has
              * removed some translation or changed page attributes.
-             * We simply invalidate the shadow.
              */
             mfn = get_mfn_from_gpfn(value >> PAGE_SHIFT);
             if (mfn != pagetable_get_pfn(v->arch.guest_table))
                 goto bad_cr3;
-            paging_update_cr3(v);
         } else {
             /*
              * If different, make a shadow. Check if the PDBR is valid

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

<Prev in Thread] Current Thread [Next in Thread>