ia64/xen-unstable

changeset 18978:5ce75a8eec7f

p2m: Small audit fixes.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jan 05 10:47:51 2009 +0000 (2009-01-05)
parents 5b44cfde9666
children 34f52eafd4e3
files xen/arch/x86/mm/p2m.c
line diff
     1.1 --- a/xen/arch/x86/mm/p2m.c	Mon Jan 05 10:47:03 2009 +0000
     1.2 +++ b/xen/arch/x86/mm/p2m.c	Mon Jan 05 10:47:51 2009 +0000
     1.3 @@ -1653,6 +1653,8 @@ static void audit_p2m(struct domain *d)
     1.4      if ( test_linear )
     1.5          flush_tlb_local();
     1.6  
     1.7 +    spin_lock(&d->page_alloc_lock);
     1.8 +
     1.9      /* Audit part one: walk the domain's page allocation list, checking
    1.10       * the m2p entries. */
    1.11      for ( entry = d->page_list.next;
    1.12 @@ -1720,6 +1722,8 @@ static void audit_p2m(struct domain *d)
    1.13          //                mfn, gfn, p2mfn, lp2mfn);
    1.14      }
    1.15  
    1.16 +    spin_unlock(&d->page_alloc_lock);
    1.17 +
    1.18      /* Audit part two: walk the domain's p2m table, checking the entries. */
    1.19      if ( pagetable_get_pfn(d->arch.phys_table) != 0 )
    1.20      {
    1.21 @@ -1779,7 +1783,7 @@ static void audit_p2m(struct domain *d)
    1.22                          for ( i1 = 0; i1 < L1_PAGETABLE_ENTRIES; i1++)
    1.23                          {
    1.24                              m2pfn = get_gpfn_from_mfn(mfn+i1);
    1.25 -                            if ( m2pfn != (gfn + i) )
    1.26 +                            if ( m2pfn != (gfn + i1) )
    1.27                              {
    1.28                                  pmbad++;
    1.29                                  P2M_PRINTK("mismatch: gfn %#lx -> mfn %#lx"