bitkeeper revision 1.1236.12.11 (422de58bI6Rru29oYT0ipOgZZhpqZw)
authorcwc22@centipede.cl.cam.ac.uk <cwc22@centipede.cl.cam.ac.uk>
Tue, 8 Mar 2005 17:48:59 +0000 (17:48 +0000)
committercwc22@centipede.cl.cam.ac.uk <cwc22@centipede.cl.cam.ac.uk>
Tue, 8 Mar 2005 17:48:59 +0000 (17:48 +0000)
resolve of grant tables merge

1  2 
.rootkeys
tools/libxc/Makefile
tools/libxc/xc.h
xen/arch/x86/mm.c
xen/common/grant_table.c
xen/include/asm-x86/shadow.h

diff --cc .rootkeys
Simple merge
Simple merge
Simple merge
index 158dbb6306731883d17f3c14518172abb2e3e118,0c416f37cdc8506b376cf7953eb933ed1412ee28..aed94baeec39d555da4f4b2c005100db27c3c084
@@@ -1941,53 -2048,10 +2049,15 @@@ int do_update_va_mapping(unsigned long 
  
      if ( unlikely(!mod_l1_entry(&linear_pg_table[l1_linear_offset(va)],
                                  mk_l1_pgentry(val))) )
-         err = -EINVAL;
+         rc = -EINVAL;
  
      if ( unlikely(shadow_mode_enabled(d)) )
-         unsigned long sval = 0;
-         l1pte_propagate_from_guest(d, &val, &sval);
-         if ( unlikely(__put_user(sval, ((unsigned long *)(
-             &shadow_linear_pg_table[l1_linear_offset(va)])))) )
-         {
-             /*
-              * Since L2's are guranteed RW, failure indicates either that the
-              * page was not shadowed, or that the L2 entry has not yet been
-              * updated to reflect the shadow.
-              */
-             if ( shadow_mode_external(current->domain) )
-                 BUG(); // can't use linear_l2_table with external tables.
 +    {
-             l2_pgentry_t gpde = linear_l2_table[l2_table_offset(va)];
-             unsigned long gpfn = l2_pgentry_val(gpde) >> PAGE_SHIFT;
-             if (get_shadow_status(d, gpfn))
-             {
-                 unsigned long gmfn = __gpfn_to_mfn(d, gpfn);
-                 unsigned long *gl1e = map_domain_mem(gmfn << PAGE_SHIFT);
-                 unsigned l1_idx = l1_table_offset(va);
-                 gl1e[l1_idx] = sval;
-                 unmap_domain_mem(gl1e);
-                 put_shadow_status(d);
-                 perfc_incrc(shadow_update_va_fail1);
-             }
-             else
-                 perfc_incrc(shadow_update_va_fail2);
-         }
-         /*
-          * If we're in log-dirty mode then we need to note that we've updated
-          * the PTE in the PT-holding page. We need the machine frame number
-          * for this.
-          */
-         if ( shadow_mode_log_dirty(d) )
-             mark_dirty(d, va_to_l1mfn(va));
-   
-         check_pagetable(d, ed->arch.guest_table, "va"); /* debug */
++        if ( shadow_mode_external(current->domain) )
++            BUG(); // can't use linear_l2_table with external tables.
 +
+         update_shadow_va_mapping(va, val, ed, d);
 +    }
  
      deferred_ops = percpu_info[cpu].deferred_ops;
      percpu_info[cpu].deferred_ops = 0;
Simple merge
Simple merge