diff mbox

[v4,08/31] x86/mm: export get_page_from_mfn

Message ID 20170817144456.18989-9-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Aug. 17, 2017, 2:44 p.m. UTC
It will be used by different files later, so export it via
asm-x86/mm.h.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 xen/arch/x86/mm.c        | 2 +-
 xen/include/asm-x86/mm.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Jan Beulich Aug. 24, 2017, 2:55 p.m. UTC | #1
>>> On 17.08.17 at 16:44, <wei.liu2@citrix.com> wrote:
> It will be used by different files later, so export it via
> asm-x86/mm.h.

This is a pretty thin wrapper - wouldn't be better to make it a
static inline?

Jan
diff mbox

Patch

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 7eb80ecaa3..d25d314673 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -666,7 +666,7 @@  int map_ldt_shadow_page(unsigned int off)
 }
 
 
-static bool get_page_from_mfn(mfn_t mfn, struct domain *d)
+bool get_page_from_mfn(mfn_t mfn, struct domain *d)
 {
     struct page_info *page = mfn_to_page(mfn_x(mfn));
 
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index 2bf3f335ad..c6e1d01c7d 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -344,6 +344,7 @@  int  put_old_guest_table(struct vcpu *);
 int  get_page_from_l1e(
     l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner);
 void put_page_from_l1e(l1_pgentry_t l1e, struct domain *l1e_owner);
+bool get_page_from_mfn(mfn_t mfn, struct domain *d);
 
 static inline void put_page_and_type(struct page_info *page)
 {