x86/mm: export get_page_from_mfn

It will be used later in multiple files.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Wei Liu committed 2017-09-22 16:31:50 +01:00
1 parent 0f43e9cb6f
commit 60a2de33a7
2 files changed
+14 -16

No files matched your search

-16
View File
@@ -706,22 +706,6 @@ bool map_ldt_shadow_page(unsigned int offset)
return true;
}
static bool get_page_from_mfn(mfn_t mfn, struct domain *d)
{
struct page_info *page = mfn_to_page(mfn);
if ( unlikely(!mfn_valid(mfn)) || unlikely(!get_page(page, d)) )
{
gdprintk(XENLOG_WARNING,
"Could not get page ref for mfn %"PRI_mfn"\n", mfn_x(mfn));
return false;
}
return true;
}
static int get_page_and_type_from_mfn(
mfn_t mfn, unsigned long type, struct domain *d,
int partial, int preemptible)
+14
View File
@@ -369,6 +369,20 @@ 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);
static inline bool get_page_from_mfn(mfn_t mfn, struct domain *d)
{
struct page_info *page = __mfn_to_page(mfn_x(mfn));
if ( unlikely(!mfn_valid(mfn)) || unlikely(!get_page(page, d)) )
{
gdprintk(XENLOG_WARNING,
"Could not get page ref for mfn %"PRI_mfn"\n", mfn_x(mfn));
return false;
}
return true;
}
static inline void put_page_and_type(struct page_info *page)
{
put_page_type(page);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.