aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-04-11 22:24:30 +0100
committerEwan Mellor <ewan@xensource.com>2007-04-11 22:24:30 +0100
commitb0766f3da285812c19f68b8bcf49f7f8be5fe697 (patch)
treecefef8f2b08373bd33d30a077165e5cb31d99db0 /tools/libxen
parent3e1494d7748aa644ad3fd4e9098fe22339dc1ebe (diff)
downloadxen-b0766f3da285812c19f68b8bcf49f7f8be5fe697.tar.gz
xen-b0766f3da285812c19f68b8bcf49f7f8be5fe697.tar.bz2
xen-b0766f3da285812c19f68b8bcf49f7f8be5fe697.zip
Add documentation and C bindings for VM.add_to_VCPUs_params_live,
VM.set_memory_dynamic_{min,max}_live. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen')
-rw-r--r--tools/libxen/include/xen_vm.h22
-rw-r--r--tools/libxen/src/xen_vm.c50
2 files changed, 72 insertions, 0 deletions
diff --git a/tools/libxen/include/xen_vm.h b/tools/libxen/include/xen_vm.h
index 0f5c440c16..54abe1ba82 100644
--- a/tools/libxen/include/xen_vm.h
+++ b/tools/libxen/include/xen_vm.h
@@ -838,6 +838,28 @@ xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu);
/**
+ * Add the given key-value pair to VM.VCPUs_params, and apply that
+ * value on the running VM.
+ */
+extern bool
+xen_vm_add_to_vcpus_params_live(xen_session *session, xen_vm self, char *key, char *value);
+
+
+/**
+ * Set memory_dynamic_max in database and on running VM.
+ */
+extern bool
+xen_vm_set_memory_dynamic_max_live(xen_session *session, xen_vm self, int64_t max);
+
+
+/**
+ * Set memory_dynamic_min in database and on running VM.
+ */
+extern bool
+xen_vm_set_memory_dynamic_min_live(xen_session *session, xen_vm self, int64_t min);
+
+
+/**
* Send the given key as a sysrq to this VM. The key is specified as a
* single character (a String of length 1). This can only be called when the
* specified VM is in the Running state.
diff --git a/tools/libxen/src/xen_vm.c b/tools/libxen/src/xen_vm.c
index 5f5aa72b9a..6f88a9239a 100644
--- a/tools/libxen/src/xen_vm.c
+++ b/tools/libxen/src/xen_vm.c
@@ -1610,6 +1610,56 @@ xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu)
bool
+xen_vm_add_to_vcpus_params_live(xen_session *session, xen_vm self, char *key, char *value)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = self },
+ { .type = &abstract_type_string,
+ .u.string_val = key },
+ { .type = &abstract_type_string,
+ .u.string_val = value }
+ };
+
+ xen_call_(session, "VM.add_to_VCPUs_params_live", param_values, 3, NULL, NULL);
+ return session->ok;
+}
+
+
+bool
+xen_vm_set_memory_dynamic_max_live(xen_session *session, xen_vm self, int64_t max)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = self },
+ { .type = &abstract_type_int,
+ .u.int_val = max }
+ };
+
+ xen_call_(session, "VM.set_memory_dynamic_max_live", param_values, 2, NULL, NULL);
+ return session->ok;
+}
+
+
+bool
+xen_vm_set_memory_dynamic_min_live(xen_session *session, xen_vm self, int64_t min)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = self },
+ { .type = &abstract_type_int,
+ .u.int_val = min }
+ };
+
+ xen_call_(session, "VM.set_memory_dynamic_min_live", param_values, 2, NULL, NULL);
+ return session->ok;
+}
+
+
+bool
xen_vm_send_sysrq(xen_session *session, xen_vm vm, char *key)
{
abstract_value param_values[] =