1 #ifndef _XEN_P2M_COMMON_H
2 #define _XEN_P2M_COMMON_H
3 
4 #include <xen/mm.h>
5 
6 /* Remove a page from a domain's p2m table */
7 int __must_check
8 guest_physmap_remove_page(struct domain *d, gfn_t gfn, mfn_t mfn,
9                           unsigned int page_order);
10 
11 /* Map MMIO regions in the p2m: start_gfn and nr describe the range in
12  *  * the guest physical address space to map, starting from the machine
13  *   * frame number mfn. */
14 int map_mmio_regions(struct domain *d,
15                      gfn_t start_gfn,
16                      unsigned long nr,
17                      mfn_t mfn);
18 int unmap_mmio_regions(struct domain *d,
19                        gfn_t start_gfn,
20                        unsigned long nr,
21                        mfn_t mfn);
22 
23 /*
24  * Populate-on-Demand
25  */
26 
27 /*
28  * Call when decreasing memory reservation to handle PoD entries properly.
29  * Returns the number of pages that were successfully processed.
30  */
31 unsigned long
32 p2m_pod_decrease_reservation(struct domain *d, gfn_t gfn,
33                              unsigned int order);
34 
35 int __must_check check_get_page_from_gfn(struct domain *d, gfn_t gfn,
36                                          bool readonly, p2m_type_t *p2mt_p,
37                                          struct page_info **page_p);
38 
39 
40 #endif /* _XEN_P2M_COMMON_H */
41