|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 10/17] xen/x86: pv: Use maddr_to_mfn(...) instead of the open-coding version
From: Julien Grall <jgrall@xxxxxxxxxx>
_mfn(addr >> PAGE_SHIFT) is equivalent to maddr_to_mfn(addr).
Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
---
xen/arch/x86/pv/grant_table.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 )
--
2.17.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 |