bitkeeper revision 1.843 (40714f09cklfEzBYIm_KulGL0G3wqw)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 5 Apr 2004 12:20:25 +0000 (12:20 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 5 Apr 2004 12:20:25 +0000 (12:20 +0000)
Manual merge

1  2 
xen/common/memory.c
xen/include/xen/shadow.h

index c632b946c61ca04ee49c1c0aec5821797555c3d7,6b3b9d4e707e9c313f5d59f9214ee10b9b0ba3e8..420eb1ea3186e1dc264bfb145c613ae2bb4c6b5e
@@@ -1140,21 -1138,26 +1140,28 @@@ int do_update_va_mapping(unsigned long 
      {
          unsigned long sval;
  
 -      l1pte_no_fault( &current->mm, &val, &sval );
 +        l1pte_no_fault( &current->mm, &val, &sval );
  
 -      if ( unlikely(__put_user( sval, ((unsigned long *) (&shadow_linear_pg_table[page_nr])) ) ) )
 -      {
 -          // Since L2's are guranteed RW, failure indicates the page
 -          // was not shadowed, so ignore.
 +        if ( unlikely(__put_user(sval, ((unsigned long *)(
 +            &shadow_linear_pg_table[page_nr])))) )
 +        {
 +            /*
 +             * Since L2's are guranteed RW, failure indicates the page was not 
 +             * shadowed, so ignore.
 +             */
              perfc_incrc(shadow_update_va_fail);
 -          //MEM_LOG("update_va_map: couldn't write update\n");        
 -      }
 +        }
  
-         check_pagetable(p, p->mm.pagetable, "va"); /* debug */
 -      check_pagetable( p, p->mm.pagetable, "va" ); // debug
+       /* if we're in logdirty mode, we need to note that we've updated the
+          PTE in the PT-holding page. This is a bit of a pain as we don't
+          know the physcial (machine) frame number of the page */
+       if ( p->mm.shadow_mode == SHM_logdirty )
 -        mark_dirty( &current->mm, va_to_l1mfn(page_nr<<PAGE_SHIFT) );    
++        mark_dirty( &current->mm, va_to_l1mfn(page_nr<<PAGE_SHIFT) );  
++  
++      check_pagetable( p, p->mm.pagetable, "va" ); // debug
      }
  
 -
      deferred_ops = percpu_info[cpu].deferred_ops;
      percpu_info[cpu].deferred_ops = 0;
  
Simple merge