From: Vincent Hanquez Subject: [PATCH 5/7] move the domain_info_context into the restore_context Date: Tue, 1 Dec 2009 06:59:12 +0000 Message-ID: <1259650754-15971-6-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_restore.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) --------------1.6.5.2 Content-Type: text/x-patch; name="0005-move-the-domain_info_context-into-the-restore_contex.patch" Content-Disposition: attachment; filename="0005-move-the-domain_info_context-into-the-restore_contex.patch" Content-Transfer-Encoding: quoted-printable diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_rest= ore.c index 539d1b9..f178b00 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -40,6 +40,7 @@ struct restore_ctx { xen_pfn_t *live_p2m; /* Live mapping of the table mapping each PFN t= o its current MFN. */ xen_pfn_t *p2m; /* A table mapping each PFN to its new MFN. */ unsigned no_superpage_mem; /* If have enough continuous memory for s= uper page allocation */ + struct domain_info_context dinfo; }; =20 static struct restore_ctx _ctx =3D { @@ -49,9 +50,6 @@ static struct restore_ctx _ctx =3D { }; static struct restore_ctx *ctx =3D &_ctx; =20 -static struct domain_info_context _dinfo; -static struct domain_info_context *dinfo =3D &_dinfo; - /* ** ** @@ -315,6 +313,7 @@ static int allocate_physmem(int xc_handle, uint32_t d= om, /* Buffer of pfn list for 2M page, or series of 4K pages */ xen_pfn_t *batch_buf; unsigned int batch_buf_len; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 if ( !superpages ) { @@ -504,6 +503,7 @@ static int uncanonicalize_pagetable(int xc_handle, ui= nt32_t dom, int i, pte_last; unsigned long pfn; uint64_t pte; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 pte_last =3D PAGE_SIZE / ((ctx->pt_levels =3D=3D 2)? 4 : 8); =20 @@ -548,6 +548,7 @@ static xen_pfn_t *load_p2m_frame_list( xen_pfn_t *p2m_frame_list; vcpu_guest_context_any_t ctxt; xen_pfn_t p2m_fl_zero; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 /* Read first entry of P2M list, or extended-info signature (~0UL). = */ if ( read_exact(io_fd, &p2m_fl_zero, sizeof(long)) ) @@ -864,6 +865,7 @@ static int buffer_tail_pv(struct tailbuf_pv *buf, int= fd, { unsigned int i; size_t pfnlen, vcpulen; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 /* TODO: handle changing pfntab and vcpu counts */ /* PFN tab */ @@ -1172,6 +1174,7 @@ static int apply_batch(int xc_handle, uint32_t dom,= xen_pfn_t* region_mfn, /* A temporary mapping, and a copy, of one frame of guest memory. */ unsigned long *page =3D NULL; int nraces =3D 0; + struct domain_info_context *dinfo =3D &ctx->dinfo; =20 unsigned long mfn, pfn, pagetype; =20 @@ -1347,6 +1350,8 @@ int xc_domain_restore(int xc_handle, int io_fd, uin= t32_t dom, tailbuf_t tailbuf, tmptail; void* vcpup; =20 + struct domain_info_context *dinfo =3D &ctx->dinfo; + pagebuf_init(&pagebuf); memset(&tailbuf, 0, sizeof(tailbuf)); tailbuf.ishvm =3D hvm; --------------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--