From: Wei Liu Subject: Re: [RFC PATCH COLO v5 05/29] Introduce a new internal API libxl__domain_unpause() Date: Wed, 8 Apr 2015 19:12:28 +0100 Message-ID: <20150408181228.GT30811@zion.uk.xensource.com> References: <1427870525-18686-1-git-send-email-yanghy@cn.fujitsu.com> <1427870525-18686-6-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1427870525-18686-6-git-send-email-yanghy@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Hongyang Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, wency@cn.fujitsu.com, ian.jackson@eu.citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, xen-devel@lists.xen.org, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org On Wed, Apr 01, 2015 at 02:41:41PM +0800, Yang Hongyang wrote: > From: Wen Congyang > > The guest is paused after libxl_domain_create_restore(). > Secondary vm is running in colo mode. So we need to unpause > the guest. The current API libxl_domain_unpause() is > not an internal API. Introduce a new API to support it. > It would be good if you can say "No functional change" in commit log in the future. > Signed-off-by: Wen Congyang > --- > tools/libxl/libxl.c | 21 +++++++++++++++------ > tools/libxl/libxl_internal.h | 1 + > 2 files changed, 16 insertions(+), 6 deletions(-) > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > index 6e55afc..c3898ce 100644 > --- a/tools/libxl/libxl.c > +++ b/tools/libxl/libxl.c > @@ -1037,9 +1037,8 @@ out: > return AO_INPROGRESS; > } > > -int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid) > +int libxl__domain_unpause(libxl__gc *gc, uint32_t domid) > { > - GC_INIT(ctx); > char *path; > char *state; > int ret, rc = 0; > @@ -1059,12 +1058,22 @@ int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid) > NULL, NULL, NULL); > } > } > - ret = xc_domain_unpause(ctx->xch, domid); > - if (ret<0) { > - LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "unpausing domain %d", domid); > + > + ret = xc_domain_unpause(CTX->xch, domid); > + if (ret < 0) { > + LOGE(ERROR, "unpausing domain %d", domid); > rc = ERROR_FAIL; > } > - out: > + > +out: Nit, this change is not strictly necessary. Wei.