aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_domain.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-10-20 08:45:12 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-10-20 08:45:12 +0100
commit87cb99a6dda5f1b5b0ace461757eae782a3d7873 (patch)
tree41b3b542fc08f4cc520271aba421813eb1b028e4 /tools/libxc/xc_domain.c
parent5cee2dafd8e2e76f7cc2a783102399822b5bb554 (diff)
downloadxen-87cb99a6dda5f1b5b0ace461757eae782a3d7873.tar.gz
xen-87cb99a6dda5f1b5b0ace461757eae782a3d7873.tar.bz2
xen-87cb99a6dda5f1b5b0ace461757eae782a3d7873.zip
Add nomigrate config option to disable migration/restore
The new nomigrate option can be set to non-zero in vm.cfg (for both hvm and pvm) to disallow a guest from being migrated or restored. (Save is still allowed for the purpose of checkpointing.) The option persists into a save file and is also communicated into the hypervisor, the latter for the purposes of a to-be-added hypercall for communicating to guests that migration is disallowed (which will be used initially for userland TSC-related sensing, but may find other uses). Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'tools/libxc/xc_domain.c')
-rw-r--r--tools/libxc/xc_domain.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index 61cde9af39..f872583926 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -475,6 +475,15 @@ int xc_domain_set_tsc_native(int xc_handle, uint32_t domid, int is_native)
return do_domctl(xc_handle, &domctl);
}
+int xc_domain_disable_migrate(int xc_handle, uint32_t domid)
+{
+ DECLARE_DOMCTL;
+ domctl.cmd = XEN_DOMCTL_disable_migrate;
+ domctl.domain = (domid_t)domid;
+ domctl.u.disable_migrate.disable = 1;
+ return do_domctl(xc_handle, &domctl);
+}
+
int xc_domain_memory_increase_reservation(int xc_handle,
uint32_t domid,
unsigned long nr_extents,