blob: 1daae485e3360b3f8b30aea342b85b365230e705 [file] [log] [blame]
Jeremy Fitzhardinge9be4d452010-08-31 15:01:16 -07001#ifndef _XEN_PAGE_H
2#define _XEN_PAGE_H
3
Isaku Yamahata20e71f2e2008-04-02 10:53:58 -07004#include <asm/xen/page.h>
Jeremy Fitzhardinge9be4d452010-08-31 15:01:16 -07005
Julien Grall0df4f262015-08-07 17:34:37 +01006static inline unsigned long xen_page_to_gfn(struct page *page)
David Vrabel28e98c22015-01-13 17:16:42 +00007{
Julien Grall0df4f262015-08-07 17:34:37 +01008 return pfn_to_gfn(page_to_pfn(page));
David Vrabel28e98c22015-01-13 17:16:42 +00009}
10
David Vrabel8b5d44a2011-09-28 17:46:34 +010011struct xen_memory_region {
Juergen Gross626d7502015-09-04 14:05:51 +020012 unsigned long start_pfn;
13 unsigned long n_pfns;
David Vrabel8b5d44a2011-09-28 17:46:34 +010014};
15
16#define XEN_EXTRA_MEM_MAX_REGIONS 128 /* == E820MAX */
17
18extern __initdata
19struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS];
Jeremy Fitzhardinge9be4d452010-08-31 15:01:16 -070020
David Vrabelaa244112011-09-28 17:46:32 +010021extern unsigned long xen_released_pages;
22
Jeremy Fitzhardinge9be4d452010-08-31 15:01:16 -070023#endif /* _XEN_PAGE_H */