Message ID | 20200322161418.31606-11-julien@xen.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Bunch of typesafe conversion | expand |
On 22.03.2020 17:14, julien@xen.org wrote: > From: Julien Grall <jgrall@amazon.com> > > _mfn(addr >> PAGE_SHIFT) is equivalent to maddr_to_mfn(addr). > > Signed-off-by: Julien Grall <jgrall@amazon.com> Acked-by: Jan Beulich <jbeulich@suse.com>
diff --git a/xen/arch/x86/pv/grant_table.c b/xen/arch/x86/pv/grant_table.c index 0325618c98..f80e233621 100644 --- a/xen/arch/x86/pv/grant_table.c +++ b/xen/arch/x86/pv/grant_table.c @@ -72,7 +72,7 @@ int create_grant_pv_mapping(uint64_t addr, mfn_t frame, goto out; } - gl1mfn = _mfn(addr >> PAGE_SHIFT); + gl1mfn = maddr_to_mfn(addr); page = get_page_from_mfn(gl1mfn, currd); if ( !page ) @@ -228,7 +228,7 @@ int replace_grant_pv_mapping(uint64_t addr, mfn_t frame, goto out; } - gl1mfn = _mfn(addr >> PAGE_SHIFT); + gl1mfn = maddr_to_mfn(addr); page = get_page_from_mfn(gl1mfn, currd); if ( !page )