WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 09/14]: libxenlight, domain resume

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 09/14]: libxenlight, domain resume
From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Date: Mon, 30 Nov 2009 14:15:16 -0500
Cc:
Delivery-date: Mon, 30 Nov 2009 11:16:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090817)
Added libxenlight implementation for resume domain.
This brings back a domain from the shutdown state
after save, enabling checkpointing.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1259261993 18000
# Node ID 4f6a83e7b25f8fb3dbdd683934b37a9807f47977
# Parent  d8aa40229a93d66c097f058c77402a1180bbac94
Added libxenlight implementation for resume domain.
This brings back a domain from the shutdown state
after save, enabling checkpointing.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

diff -r d8aa40229a93 -r 4f6a83e7b25f libxl.c
--- a/libxl.c
+++ b/libxl.c
@@ -251,6 +251,23 @@ int libxl_domain_restore(struct libxl_ct
     return 0;
 }
 
+int libxl_domain_resume(struct libxl_ctx *ctx, uint32_t domid)
+{
+    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 d8aa40229a93 -r 4f6a83e7b25f libxl.h
--- a/libxl.h
+++ b/libxl.h
@@ -257,6 +257,7 @@ int libxl_domain_restore(struct libxl_ct
                           uint32_t domid, int fd);
 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);
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>