[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] x86: don't open-code l<N>e_to_mfn()
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/arch/x86/mm/p2m-pt.c +++ b/xen/arch/x86/mm/p2m-pt.c @@ -779,9 +779,9 @@ pod_retry_l3: } if ( flags & _PAGE_PSE ) { - mfn = _mfn(l3e_get_pfn(*l3e) + - l2_table_offset(addr) * L1_PAGETABLE_ENTRIES + - l1_table_offset(addr)); + mfn = mfn_add(l3e_get_mfn(*l3e), + l2_table_offset(addr) * L1_PAGETABLE_ENTRIES + + l1_table_offset(addr)); *t = p2m_recalc_type(recalc || _needs_recalc(flags), p2m_flags_to_type(flags), p2m, gfn); unmap_domain_page(l3e); @@ -820,7 +820,7 @@ pod_retry_l2: } if ( flags & _PAGE_PSE ) { - mfn = _mfn(l2e_get_pfn(*l2e) + l1_table_offset(addr)); + mfn = mfn_add(l2e_get_mfn(*l2e), l1_table_offset(addr)); *t = p2m_recalc_type(recalc || _needs_recalc(flags), p2m_flags_to_type(flags), p2m, gfn); unmap_domain_page(l2e); --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -291,7 +291,7 @@ void copy_page_sse2(void *, const void * #define pfn_to_paddr(pfn) __pfn_to_paddr(pfn) #define paddr_to_pfn(pa) __paddr_to_pfn(pa) #define paddr_to_pdx(pa) pfn_to_pdx(paddr_to_pfn(pa)) -#define vmap_to_mfn(va) _mfn(l1e_get_pfn(*virt_to_xen_l1e((unsigned long)(va)))) +#define vmap_to_mfn(va) l1e_get_mfn(*virt_to_xen_l1e((unsigned long)(va))) #define vmap_to_page(va) mfn_to_page(vmap_to_mfn(va)) #endif /* !defined(__ASSEMBLY__) */
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |