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