[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.10] xen/pvshim: re-order replace_va_mapping code
commit ee478f473740a79cdbb74fe67306724dd5ca1e62 Author: Roger Pau Monne <roger.pau@xxxxxxxxxx> AuthorDate: Wed Jan 17 09:24:03 2018 +0000 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Mon Mar 5 15:49:50 2018 +0000 xen/pvshim: re-order replace_va_mapping code No functional change. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> (cherry picked from commit 72eb5d7320192a7999f5ca840b65d4935e202e89) --- 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..aa5d416b75 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 -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.10 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |