# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259675750 0
# Node ID c0facdf07956bb7d93a3d7a005d090af2e64561f
# Parent aec4b8386391f749ffe00dd3a5307c3cc80034e0
libxc: move the domain_info_context into the restore_context
Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
tools/libxc/xc_domain_restore.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff -r aec4b8386391 -r c0facdf07956 tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c Tue Dec 01 13:55:15 2009 +0000
+++ b/tools/libxc/xc_domain_restore.c Tue Dec 01 13:55:50 2009 +0000
@@ -40,6 +40,7 @@ struct restore_ctx {
xen_pfn_t *live_p2m; /* Live mapping of the table mapping each PFN to 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 super
page allocation */
+ struct domain_info_context dinfo;
};
static struct restore_ctx _ctx = {
@@ -48,9 +49,6 @@ static struct restore_ctx _ctx = {
.no_superpage_mem = 0,
};
static struct restore_ctx *ctx = &_ctx;
-
-static struct domain_info_context _dinfo;
-static struct domain_info_context *dinfo = &_dinfo;
/*
**
@@ -315,6 +313,7 @@ static int allocate_physmem(int xc_handl
/* 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 = &ctx->dinfo;
if ( !superpages )
{
@@ -504,6 +503,7 @@ static int uncanonicalize_pagetable(int
int i, pte_last;
unsigned long pfn;
uint64_t pte;
+ struct domain_info_context *dinfo = &ctx->dinfo;
pte_last = PAGE_SIZE / ((ctx->pt_levels == 2)? 4 : 8);
@@ -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 = &ctx->dinfo;
/* 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
{
unsigned int i;
size_t pfnlen, vcpulen;
+ struct domain_info_context *dinfo = &ctx->dinfo;
/* TODO: handle changing pfntab and vcpu counts */
/* PFN tab */
@@ -1172,6 +1174,7 @@ static int apply_batch(int xc_handle, ui
/* A temporary mapping, and a copy, of one frame of guest memory. */
unsigned long *page = NULL;
int nraces = 0;
+ struct domain_info_context *dinfo = &ctx->dinfo;
unsigned long mfn, pfn, pagetype;
@@ -1346,6 +1349,8 @@ int xc_domain_restore(int xc_handle, int
pagebuf_t pagebuf;
tailbuf_t tailbuf, tmptail;
void* vcpup;
+
+ struct domain_info_context *dinfo = &ctx->dinfo;
pagebuf_init(&pagebuf);
memset(&tailbuf, 0, sizeof(tailbuf));
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|