direct-io.hg

changeset 11130:e65bb0de33cd

[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@suse.de>
author kfraser@localhost.localdomain
date Tue Aug 15 16:31:14 2006 +0100 (2006-08-15)
parents 939f75570a15
children 5d42f6f0a187
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Tue Aug 15 16:27:26 2006 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Tue Aug 15 16:31:14 2006 +0100
     1.3 @@ -1744,6 +1744,7 @@ int new_guest_cr3(unsigned long mfn)
     1.4          if ( unlikely(!okay) )
     1.5          {
     1.6              /* Switch to idle pagetable: this VCPU has no active p.t. now. */
     1.7 +            MEM_LOG("New baseptr %lx: slow path via idle pagetables", mfn);
     1.8              old_base_mfn = pagetable_get_pfn(v->arch.guest_table);
     1.9              v->arch.guest_table = pagetable_null();
    1.10              update_pagetables(v);
    1.11 @@ -2025,8 +2026,10 @@ int do_mmuext_op(
    1.12          
    1.13  #ifdef __x86_64__
    1.14          case MMUEXT_NEW_USER_BASEPTR:
    1.15 -            okay = get_page_and_type_from_pagenr(
    1.16 -                mfn, PGT_root_page_table, d);
    1.17 +            okay = 1;
    1.18 +            if (likely(mfn != 0))
    1.19 +                okay = get_page_and_type_from_pagenr(
    1.20 +                    mfn, PGT_root_page_table, d);
    1.21              if ( unlikely(!okay) )
    1.22              {
    1.23                  MEM_LOG("Error while installing new mfn %lx", mfn);