diff options
Diffstat (limited to 'tools/libxc/xg_private.h')
-rw-r--r-- | tools/libxc/xg_private.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/libxc/xg_private.h b/tools/libxc/xg_private.h index db02ccf470..5ff2124346 100644 --- a/tools/libxc/xg_private.h +++ b/tools/libxc/xg_private.h @@ -136,6 +136,15 @@ struct domain_info_context { unsigned long p2m_size; }; +static inline xen_pfn_t pfn_to_mfn(xen_pfn_t pfn, xen_pfn_t *p2m, int gwidth) +{ + return ((xen_pfn_t) ((gwidth==8)? + (((uint64_t *)p2m)[(pfn)]): + ((((uint32_t *)p2m)[(pfn)]) == 0xffffffffU ? + (-1UL) : + (((uint32_t *)p2m)[(pfn)])))); +} + /* Number of xen_pfn_t in a page */ #define FPP (PAGE_SIZE/(dinfo->guest_width)) |