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

[Xen-changelog] [xen-unstable] [XEN] Add tracing to slow path in setting new guest %cr3 value.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID e65bb0de33cd0265244a0df50f3773d29b6f1263
# Parent  939f75570a15af51bb4173cb7fa945a86414431a
[XEN] Add tracing to slow path in setting new guest %cr3 value.
Also, allow x86/64 user cr3 value to be reset to zero.
Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxx>
---
 xen/arch/x86/mm.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 939f75570a15 -r e65bb0de33cd xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Tue Aug 15 16:27:26 2006 +0100
+++ b/xen/arch/x86/mm.c Tue Aug 15 16:31:14 2006 +0100
@@ -1744,6 +1744,7 @@ int new_guest_cr3(unsigned long mfn)
         if ( unlikely(!okay) )
         {
             /* Switch to idle pagetable: this VCPU has no active p.t. now. */
+            MEM_LOG("New baseptr %lx: slow path via idle pagetables", mfn);
             old_base_mfn = pagetable_get_pfn(v->arch.guest_table);
             v->arch.guest_table = pagetable_null();
             update_pagetables(v);
@@ -2025,8 +2026,10 @@ int do_mmuext_op(
         
 #ifdef __x86_64__
         case MMUEXT_NEW_USER_BASEPTR:
-            okay = get_page_and_type_from_pagenr(
-                mfn, PGT_root_page_table, d);
+            okay = 1;
+            if (likely(mfn != 0))
+                okay = get_page_and_type_from_pagenr(
+                    mfn, PGT_root_page_table, d);
             if ( unlikely(!okay) )
             {
                 MEM_LOG("Error while installing new mfn %lx", mfn);

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