# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259675715 0
# Node ID aec4b8386391f749ffe00dd3a5307c3cc80034e0
# Parent 0dff55218fd5b9ee8891e196b00e04e22f28e899
libxc: move domain_info_context into the save_context
Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
tools/libxc/xc_domain_save.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff -r 0dff55218fd5 -r aec4b8386391 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c Tue Dec 01 13:54:36 2009 +0000
+++ b/tools/libxc/xc_domain_save.c Tue Dec 01 13:55:15 2009 +0000
@@ -30,23 +30,22 @@
#define DEF_MAX_ITERS 29 /* limit us to 30 times round loop */
#define DEF_MAX_FACTOR 3 /* never send more than 3x p2m_size */
-struct save_context {
+struct save_ctx {
unsigned long hvirt_start; /* virtual starting address of the hypervisor */
unsigned int pt_levels; /* #levels of page tables used by the current
guest */
unsigned long max_mfn; /* max mfn of the whole machine */
xen_pfn_t *live_p2m; /* Live mapping of the table mapping each PFN to its
current MFN. */
xen_pfn_t *live_m2p; /* Live mapping of system MFN to PFN table. */
unsigned long m2p_mfn0;
+ struct domain_info_context dinfo;
};
-static struct domain_info_context _dinfo;
-static struct domain_info_context *dinfo = &_dinfo;
-
-static struct save_context _ctx = {
+static struct save_ctx _ctx = {
.live_p2m = NULL,
.live_m2p = NULL,
};
-static struct save_context *ctx = &_ctx;
+
+static struct save_ctx *ctx = &_ctx;
/* buffer for output */
struct outbuf {
@@ -403,6 +402,7 @@ static int analysis_phase(int xc_handle,
long long start, now;
xc_shadow_op_stats_t stats;
int j;
+ struct domain_info_context *dinfo = &ctx->dinfo;
start = llgettimeofday();
@@ -458,6 +458,7 @@ static void *map_frame_list_list(int xc_
{
int count = 100;
void *p;
+ struct domain_info_context *dinfo = &ctx->dinfo;
uint64_t fll = GET_FIELD(shinfo, arch.pfn_to_mfn_frame_list_list);
while ( count-- && (fll == 0) )
@@ -491,7 +492,7 @@ static int canonicalize_pagetable(unsign
static int canonicalize_pagetable(unsigned long type, unsigned long pfn,
const void *spage, void *dpage)
{
-
+ struct domain_info_context *dinfo = &ctx->dinfo;
int i, pte_last, xen_start, xen_end, race = 0;
uint64_t pte;
@@ -672,6 +673,7 @@ static xen_pfn_t *map_and_save_p2m_table
shared_info_any_t *live_shinfo)
{
vcpu_guest_context_any_t ctxt;
+ struct domain_info_context *dinfo = &ctx->dinfo;
/* Double and single indirect references to the live P2M table */
void *live_p2m_frame_list_list = NULL;
@@ -910,6 +912,7 @@ int xc_domain_save(int xc_handle, int io
unsigned long mfn;
struct outbuf ob;
+ struct domain_info_context *dinfo = &ctx->dinfo;
int completed = 0;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|