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 6 of 7] Advertise resumability feature in guest kerne

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 6 of 7] Advertise resumability feature in guest kernel
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Mon, 15 Jan 2007 12:05:16 -0700
Delivery-date: Mon, 15 Jan 2007 12:12:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1168891510@xxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1168891374 28800
# Node ID 1a3b78919a43a68948775eb4077f5dab62054f7c
# Parent  dafb7b444c2ccf1d2ab9efb8c13d62e018713a85
Advertise resumability feature in guest kernel.
Disallow xm save -c unless the guest advertises that it is resumable.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff -r dafb7b444c2c -r 1a3b78919a43 
linux-2.6-xen-sparse/drivers/xen/core/reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Mon Jan 15 12:02:54 
2007 -0800
+++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Mon Jan 15 12:02:54 
2007 -0800
@@ -204,6 +204,8 @@ static int setup_shutdown_watcher(struct
        else
                xenbus_write(XBT_NIL, "control", "feature-sysrq", "1");
 
+       xenbus_write(XBT_NIL, "control", "feature-resumable", "1");
+
        return NOTIFY_DONE;
 }
 
diff -r dafb7b444c2c -r 1a3b78919a43 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Jan 15 12:02:54 2007 -0800
+++ b/tools/python/xen/xend/XendDomain.py       Mon Jan 15 12:02:54 2007 -0800
@@ -1196,6 +1196,10 @@ class XendDomain:
             if dominfo.getDomid() == DOM0_ID:
                 raise XendError("Cannot save privileged domain %i" % domid)
 
+            if checkpoint:
+                resumable = dominfo.readDom("control/feature-resumable")
+                if not resumable:
+                    raise XendError("Guest does not support checkpointing")
             fd = os.open(dst, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
             try:
                 XendCheckpoint.save(fd, dominfo, False, False, dst,

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