From: Vincent Hanquez Subject: [PATCH 4/7] move domain_info_context into the save_context Date: Tue, 1 Dec 2009 06:59:11 +0000 Message-ID: <1259650754-15971-5-git-send-email-vincent.hanquez@eu.citrix.com> References: <1259650754-15971-1-git-send-email-vincent.hanquez@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.5.2" Return-path: In-Reply-To: <1259650754-15971-1-git-send-email-vincent.hanquez@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel Cc: Vincent Hanquez List-Id: xen-devel@lists.xenproject.org --------------1.6.5.2 Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: quoted-printable Signed-off-by: Vincent Hanquez --- tools/libxc/xc_domain_save.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) --------------1.6.5.2 Content-Type: text/x-patch; name="0004-move-domain_info_context-into-the-save_context.patch" Content-Disposition: attachment; filename="0004-move-domain_info_context-into-the-save_context.patch" Content-Transfer-Encoding: quoted-printable diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c index 0423aba..6ea86e4 100644 --- a/tools/libxc/xc_domain_save.c +++ b/tools/libxc/xc_domain_save.c @@ -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 */ =20 -struct save_context { +struct save_ctx { unsigned long hvirt_start; /* virtual starting address of the hyperv= isor */ unsigned int pt_levels; /* #levels of page tables used by the curren= t guest */ unsigned long max_mfn; /* max mfn of the whole machine */ xen_pfn_t *live_p2m; /* Live mapping of the table mapping each PFN t= o 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; }; =20 -static struct domain_info_context _dinfo; -static struct domain_info_context *dinfo =3D &_dinfo; - -static struct save_context _ctx =3D { +static struct save_ctx _ctx =3D { .live_p2m =3D NULL, .live_m2p =3D NULL, }; -static struct save_context *ctx =3D &_ctx; + +static struct save_ctx *ctx =3D &_ctx; =20 /* buffer for output */ struct outbuf { @@ -403,6 +402,7 @@ static int analysis_phase(int xc_handle, uint32_t dom= id, long long start, now; xc_shadow_op_stats_t stats; int j; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 start =3D llgettimeofday(); =20 @@ -458,6 +458,7 @@ static void *map_frame_list_list(int xc_handle, uint3= 2_t dom, { int count =3D 100; void *p; + struct domain_info_context *dinfo =3D &ctx->dinfo; uint64_t fll =3D GET_FIELD(shinfo, arch.pfn_to_mfn_frame_list_list); =20 while ( count-- && (fll =3D=3D 0) ) @@ -491,7 +492,7 @@ static void *map_frame_list_list(int xc_handle, uint3= 2_t dom, static int canonicalize_pagetable(unsigned long type, unsigned long pfn, const void *spage, void *dpage) { - + struct domain_info_context *dinfo =3D &ctx->dinfo; int i, pte_last, xen_start, xen_end, race =3D 0;=20 uint64_t pte; =20 @@ -672,6 +673,7 @@ static xen_pfn_t *map_and_save_p2m_table(int xc_handl= e, shared_info_any_t *live_shinfo) { vcpu_guest_context_any_t ctxt; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 /* Double and single indirect references to the live P2M table */ void *live_p2m_frame_list_list =3D NULL; @@ -910,6 +912,7 @@ int xc_domain_save(int xc_handle, int io_fd, uint32_t= dom, uint32_t max_iters, unsigned long mfn; =20 struct outbuf ob; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 int completed =3D 0; =20 --------------1.6.5.2 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------1.6.5.2--