[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/6] xen/pvshim: simplify replace_va_mapping code
No functional change. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/pv/shim.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c index 702249719e..4f94047695 100644 --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -117,21 +117,12 @@ uint64_t pv_shim_mem(uint64_t avail) static void __init replace_va_mapping(struct domain *d, l4_pgentry_t *l4start, unsigned long va, unsigned long mfn) { - struct page_info *page; - l4_pgentry_t *pl4e; - l3_pgentry_t *pl3e; - l2_pgentry_t *pl2e; - l1_pgentry_t *pl1e; - - pl4e = l4start + l4_table_offset(va); - pl3e = l4e_to_l3e(*pl4e); - pl3e += l3_table_offset(va); - pl2e = l3e_to_l2e(*pl3e); - pl2e += l2_table_offset(va); - pl1e = l2e_to_l1e(*pl2e); - pl1e += l1_table_offset(va); - - page = mfn_to_page(l1e_get_pfn(*pl1e)); + l4_pgentry_t *pl4e = l4start + l4_table_offset(va); + l3_pgentry_t *pl3e = l4e_to_l3e(*pl4e) + l3_table_offset(va); + l2_pgentry_t *pl2e = l3e_to_l2e(*pl3e) + l2_table_offset(va); + l1_pgentry_t *pl1e = l2e_to_l1e(*pl2e) + l1_table_offset(va); + struct page_info *page = mfn_to_page(l1e_get_pfn(*pl1e));; + put_page_and_type(page); *pl1e = l1e_from_pfn(mfn, (!is_pv_32bit_domain(d) ? L1_PROT -- 2.15.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |