From: cwc22@centipede.cl.cam.ac.uk Date: Tue, 8 Mar 2005 17:48:59 +0000 (+0000) Subject: bitkeeper revision 1.1236.12.11 (422de58bI6Rru29oYT0ipOgZZhpqZw) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~17857^2~57^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3f9c9eae7adb2d7424cb6e1ddd6d2dca25c11772;p=xen.git bitkeeper revision 1.1236.12.11 (422de58bI6Rru29oYT0ipOgZZhpqZw) resolve of grant tables merge --- 3f9c9eae7adb2d7424cb6e1ddd6d2dca25c11772 diff --cc xen/arch/x86/mm.c index 158dbb6306,0c416f37cd..aed94baeec --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@@ -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. ++ 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 */ + update_shadow_va_mapping(va, val, ed, d); + } deferred_ops = percpu_info[cpu].deferred_ops; percpu_info[cpu].deferred_ops = 0;