Message ID | 1c88c785eb9537983a1692cc379604233ff13025.1587116799.git.hongyxia@amazon.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | convert more Xen page table code to the new API | expand |
Hi Hongyan, On 17/04/2020 10:52, Hongyan Xia wrote: > From: Wei Liu <wei.liu2@citrix.com> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com> > Signed-off-by: Hongyan Xia <hongyxia@amazon.com> Reviewed-by: Julien Grall <jgrall@amazon.com> Cheers,
On 24.04.2020 11:06, Julien Grall wrote: > On 17/04/2020 10:52, Hongyan Xia wrote: >> From: Wei Liu <wei.liu2@citrix.com> >> >> Signed-off-by: Wei Liu <wei.liu2@citrix.com> >> Signed-off-by: Hongyan Xia <hongyxia@amazon.com> > > Reviewed-by: Julien Grall <jgrall@amazon.com> Acked-by: Jan Beulich <jbeulich@suse.com>
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c index 5714e5ba62..6d52183559 100644 --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -932,13 +932,13 @@ long subarch_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg) (v < (unsigned long)(machine_to_phys_mapping + max_page)); i++, v += 1UL << L2_PAGETABLE_SHIFT ) { - l3e = l4e_to_l3e(idle_pg_table[l4_table_offset(v)])[ - l3_table_offset(v)]; + l3e = l3e_from_l4e(idle_pg_table[l4_table_offset(v)], + l3_table_offset(v)); if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) ) mfn = last_mfn; else if ( !(l3e_get_flags(l3e) & _PAGE_PSE) ) { - l2e = l3e_to_l2e(l3e)[l2_table_offset(v)]; + l2e = l2e_from_l3e(l3e, l2_table_offset(v)); if ( l2e_get_flags(l2e) & _PAGE_PRESENT ) mfn = l2e_get_pfn(l2e); else