From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: [PATCH 6/7] libxenlight meta-resend: domain resume Date: Thu, 03 Dec 2009 12:07:23 -0500 Message-ID: <4B17F04B.3000308@lagarcavilla.com> References: <4B16ABD7.1070201@lagarcavilla.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080405000907000209020701" Return-path: In-Reply-To: <4B16ABD7.1070201@lagarcavilla.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: Stefano Stabellini , Vincent Hanquez , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080405000907000209020701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Added libxenlight implementation for resume domain. This brings back a cooperative pv domain from the shutdown state after save, enabling checkpointing. Signed-off-by: Andres Lagar-Cavilla --------------080405000907000209020701 Content-Type: text/x-patch; name="06_domain_resume.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="06_domain_resume.patch" # HG changeset patch # User Andres Lagar-Cavilla # Date 1259767910 18000 # Node ID f39b04723026235f08002252427d5082b36ee126 # Parent 4ce3fd759e994f9bb2588492f59346dccd54bd92 Added libxenlight implementation for resume domain. This brings back a cooperative pv domain from the shutdown state after save, enabling checkpointing. Signed-off-by: Andres Lagar-Cavilla diff -r 4ce3fd759e99 -r f39b04723026 libxl.c --- a/libxl.c +++ b/libxl.c @@ -264,6 +264,28 @@ int libxl_domain_restore(struct libxl_ct return 0; } +int libxl_domain_resume(struct libxl_ctx *ctx, uint32_t domid) +{ + if (is_hvm(ctx, domid)) { + XL_LOG(ctx, XL_LOG_DEBUG, "Called domain_resume on " + "non-cooperative hvm domain %u", domid); + return ERROR_NI; + } + if (xc_domain_resume(ctx->xch, domid, 1)) { + XL_LOG_ERRNO(ctx, XL_LOG_ERROR, + "xc_domain_resume failed for domain %u", + domid); + return ERROR_FAIL; + } + if (!xs_resume_domain(ctx->xsh, domid)) { + XL_LOG_ERRNO(ctx, XL_LOG_ERROR, + "xs_resume_domain failed for domain %u", + domid); + return ERROR_FAIL; + } + return 0; +} + struct libxl_dominfo * libxl_domain_list(struct libxl_ctx *ctx, int *nb_domain) { struct libxl_dominfo *ptr; diff -r 4ce3fd759e99 -r f39b04723026 libxl.h --- a/libxl.h +++ b/libxl.h @@ -262,6 +262,7 @@ int libxl_domain_restore(struct libxl_ct libxl_device_model_info *dm_info); int libxl_domain_suspend(struct libxl_ctx *ctx, libxl_domain_suspend_info *info, uint32_t domid, int fd); +int libxl_domain_resume(struct libxl_ctx *ctx, uint32_t domid); int libxl_domain_shutdown(struct libxl_ctx *ctx, uint32_t domid, int req); int libxl_domain_destroy(struct libxl_ctx *ctx, uint32_t domid, int force); --------------080405000907000209020701 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 --------------080405000907000209020701--