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-changelog

[Xen-changelog] [xen-unstable] libxenlight: domain resume

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxenlight: domain resume
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 03 Dec 2009 23:20:30 -0800
Delivery-date: Thu, 03 Dec 2009 23:21:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259910666 0
# Node ID 10729bee8f8a1ae2a64ab49726b44742ceafac57
# Parent  27e02e517be5cfd249ba9693cae43fa18e9d7ff1
libxenlight: domain resume

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 <andres@xxxxxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |   22 ++++++++++++++++++++++
 tools/libxl/libxl.h |    1 +
 2 files changed, 23 insertions(+)

diff -r 27e02e517be5 -r 10729bee8f8a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Dec 04 07:10:22 2009 +0000
+++ b/tools/libxl/libxl.c       Fri Dec 04 07:11:06 2009 +0000
@@ -261,6 +261,28 @@ int libxl_domain_restore(struct libxl_ct
     else
         dm_info->saved_state = NULL;
 
+    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;
 }
 
diff -r 27e02e517be5 -r 10729bee8f8a tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Fri Dec 04 07:10:22 2009 +0000
+++ b/tools/libxl/libxl.h       Fri Dec 04 07:11:06 2009 +0000
@@ -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);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxenlight: domain resume, Xen patchbot-unstable <=