diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2012-10-09 15:05:30 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2012-10-09 15:05:30 +0100 |
commit | 417597de7559f7ea68133878c7d1b893cf7404b6 (patch) | |
tree | e92bd879be1d8faa3f0aaf2260d0f5971412c3b3 /tools/libxc/xc_dom.h | |
parent | 9595ef77ab11f44144705e8f6fb20b8759144d70 (diff) | |
download | xen-417597de7559f7ea68133878c7d1b893cf7404b6.tar.gz xen-417597de7559f7ea68133878c7d1b893cf7404b6.tar.bz2 xen-417597de7559f7ea68133878c7d1b893cf7404b6.zip |
libxc: add ARM support to xc_dom (PV domain building)
Includes ARM zImage support.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxc/xc_dom.h')
-rw-r--r-- | tools/libxc/xc_dom.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tools/libxc/xc_dom.h b/tools/libxc/xc_dom.h index 2aef64af26..3cd6dae6d6 100644 --- a/tools/libxc/xc_dom.h +++ b/tools/libxc/xc_dom.h @@ -89,10 +89,24 @@ struct xc_dom_image { /* other state info */ uint32_t f_active[XENFEAT_NR_SUBMAPS]; + /* + * p2m_host maps guest physical addresses an offset from + * rambase_pfn (see below) into gfns. + * + * For a pure PV guest this means that it maps GPFNs into MFNs for + * a hybrid guest this means that it maps GPFNs to GPFNS. + * + * Note that the input is offset by rambase. + */ xen_pfn_t *p2m_host; void *p2m_guest; - /* physical memory */ + /* physical memory + * + * A PV guest has a single contiguous block of physical RAM, + * consisting of total_pages starting at rambase_pfn. + */ + xen_pfn_t rambase_pfn; xen_pfn_t total_pages; struct xc_dom_phys *phys_pages; int realmodearea_log; @@ -286,7 +300,7 @@ static inline xen_pfn_t xc_dom_p2m_host(struct xc_dom_image *dom, xen_pfn_t pfn) { if (dom->shadow_enabled) return pfn; - return dom->p2m_host[pfn]; + return dom->p2m_host[pfn - dom->rambase_pfn]; } static inline xen_pfn_t xc_dom_p2m_guest(struct xc_dom_image *dom, @@ -294,7 +308,7 @@ static inline xen_pfn_t xc_dom_p2m_guest(struct xc_dom_image *dom, { if (xc_dom_feature_translated(dom)) return pfn; - return dom->p2m_host[pfn]; + return dom->p2m_host[pfn - dom->rambase_pfn]; } /* --- arch bits --------------------------------------------------- */ |