|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 1 of 8] Add resumedomain domctl to resume a domain af
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1168565202 28800
# Node ID 4514d8e0843ca4e46128dd43e3f0d2b04b24ff92
# Parent a84fc0de350d276cb2b3359102f6fda32bc18922
Add resumedomain domctl to resume a domain after checkpoint.
Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
diff -r a84fc0de350d -r 4514d8e0843c xen/common/domctl.c
--- a/xen/common/domctl.c Thu Jan 11 11:41:44 2007 +0000
+++ b/xen/common/domctl.c Thu Jan 11 17:26:42 2007 -0800
@@ -250,6 +250,31 @@ ret_t do_domctl(XEN_GUEST_HANDLE(xen_dom
}
break;
+ case XEN_DOMCTL_resumedomain:
+ {
+ struct domain *d = find_domain_by_id(op->domain);
+ struct vcpu *v;
+
+ ret = -ESRCH;
+ if ( d != NULL )
+ {
+ ret = -EINVAL;
+ printk("Resuming domain %d\n", op->domain);
+ if ( (d != current->domain) && (d->vcpu[0] != NULL) &&
+ test_bit(_DOMF_shutdown, &d->domain_flags) )
+ {
+ clear_bit(_DOMF_shutdown, &d->domain_flags);
+
+ for_each_vcpu (d, v)
+ vcpu_wake (v);
+
+ ret = 0;
+ }
+ put_domain(d);
+ }
+ }
+ break;
+
case XEN_DOMCTL_createdomain:
{
struct domain *d;
diff -r a84fc0de350d -r 4514d8e0843c xen/include/public/domctl.h
--- a/xen/include/public/domctl.h Thu Jan 11 11:41:44 2007 +0000
+++ b/xen/include/public/domctl.h Thu Jan 11 17:26:42 2007 -0800
@@ -63,6 +63,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_creat
#define XEN_DOMCTL_destroydomain 2
#define XEN_DOMCTL_pausedomain 3
#define XEN_DOMCTL_unpausedomain 4
+#define XEN_DOMCTL_resumedomain 26
#define XEN_DOMCTL_getdomaininfo 5
struct xen_domctl_getdomaininfo {
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|