ia64/xen-unstable

changeset 2536:b0dc856e718b

bitkeeper revision 1.1159.83.8 (415421fc4irYM7lRnfgBL95gq6oWVg)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk
author iap10@labyrinth.cl.cam.ac.uk
date Fri Sep 24 13:32:44 2004 +0000 (2004-09-24)
parents 4d222bf4d125 f96aba5772bd
children 5d8883c5a53a e3496a6ed8a8
files xen/arch/x86/memory.c
line diff
     1.1 --- a/xen/arch/x86/memory.c	Fri Sep 24 10:03:32 2004 +0000
     1.2 +++ b/xen/arch/x86/memory.c	Fri Sep 24 13:32:44 2004 +0000
     1.3 @@ -1870,30 +1870,32 @@ void audit_domain( struct domain *d)
     1.4  
     1.5              if ( tcount < 0 )
     1.6              {
     1.7 +		// This will only come out once
     1.8                  printk("Audit %d: type count whent below zero pfn=%x taf=%x otaf=%x\n",
     1.9                         d->domain, page-frame_table,
    1.10                         page->u.inuse.type_info,
    1.11                         page->tlbflush_timestamp);
    1.12 -                return;
    1.13              }
    1.14              
    1.15              page->u.inuse.type_info =
    1.16 -                (page->u.inuse.type_info & ~PGT_count_mask) | tcount;
    1.17 +                (page->u.inuse.type_info & ~PGT_count_mask) | 
    1.18 +		(tcount & PGT_count_mask);
    1.19          }
    1.20  
    1.21          ctot++;
    1.22          count += dir;
    1.23          if ( count < 0 )
    1.24          {
    1.25 +	    // This will only come out once
    1.26              printk("Audit %d: general count whent below zero pfn=%x taf=%x otaf=%x\n",
    1.27                     d->domain, page-frame_table,
    1.28                     page->u.inuse.type_info,
    1.29                     page->tlbflush_timestamp);
    1.30 -            return;
    1.31          }
    1.32              
    1.33          page->count_info =
    1.34 -            (page->count_info & ~PGC_count_mask) | count;            
    1.35 +            (page->count_info & ~PGC_count_mask) | 
    1.36 +	    (count & PGC_count_mask);            
    1.37  
    1.38      }
    1.39  
    1.40 @@ -2055,11 +2057,34 @@ void audit_domain( struct domain *d)
    1.41  
    1.42                      if ( (l1page->u.inuse.type_info & PGT_type_mask) !=
    1.43                           PGT_l1_page_table )
    1.44 -                        printk("Audit %d: [%x] Expected L1 t=%x pfn=%lx\n",
    1.45 -                               d->domain, i,
    1.46 -                               l1page->u.inuse.type_info,
    1.47 -                               l1pfn);
    1.48 +		    {
    1.49 +			if( (l1page->u.inuse.type_info & PGT_type_mask) ==
    1.50 +			    PGT_l2_page_table )
    1.51 +			{
    1.52 +			    if( l1pfn == pfn )			    
    1.53 +			    {
    1.54 +				printk("Audit %d: [%x] Found Self Linear PT t=%x pfn=%lx\n",
    1.55 +				       d->domain, i,
    1.56 +				       l1page->u.inuse.type_info,
    1.57 +				       l1pfn);
    1.58 +			    }
    1.59 +			    else
    1.60 +			    {
    1.61 +				printk("Audit %d: [%x] Found Other Linear PT t=%x pfn=%lx\n",
    1.62 +				       d->domain, i,
    1.63 +				       l1page->u.inuse.type_info,
    1.64 +				       l1pfn);
    1.65 +			    }
    1.66 +			}
    1.67 +			else
    1.68 +			{
    1.69 +			    printk("Audit %d: [%x] Expected L1 t=%x pfn=%lx\n",
    1.70 +				   d->domain, i,
    1.71 +				   l1page->u.inuse.type_info,
    1.72 +				   l1pfn);
    1.73 +			}
    1.74  
    1.75 +		    }
    1.76                      adjust( l1page, -1, 1 );
    1.77                  }
    1.78              }