[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Implement xen_vm_set_vcpus_number,



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID a874d1170fbcc45ddb317087dba41db6363eab86
# Parent  5eb2f333c9811f7b6e2f0fdc67e875120fb7bde8
Implement xen_vm_set_vcpus_number,
xen_vm_{add,remove}_vcpus_features_force{on,off}.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/include/xen_vm.h |   39 ++++++++++++++++++++
 tools/libxen/src/xen_vm.c     |   80 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 119 insertions(+)

diff -r 5eb2f333c981 -r a874d1170fbc tools/libxen/include/xen_vm.h
--- a/tools/libxen/include/xen_vm.h     Fri Dec 08 11:13:44 2006 +0000
+++ b/tools/libxen/include/xen_vm.h     Sat Dec 09 17:16:52 2006 +0000
@@ -607,6 +607,13 @@ xen_vm_set_vcpus_params(xen_session *ses
 
 
 /**
+ * Set the VCPUs/number field of the given VM.
+ */
+extern bool
+xen_vm_set_vcpus_number(xen_session *session, xen_vm vm, int64_t number);
+
+
+/**
  * Set the VCPUs/features/force_on field of the given VM.
  */
 extern bool
@@ -614,10 +621,42 @@ xen_vm_set_vcpus_features_force_on(xen_s
 
 
 /**
+ * Add the given value to the VCPUs/features/force_on field of the
+ * given VM.  If the value is already in that Set, then do nothing.
+ */
+extern bool
+xen_vm_add_vcpus_features_force_on(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value);
+
+
+/**
+ * Remove the given value from the VCPUs/features/force_on field of the
+ * given VM.  If the value is not in that Set, then do nothing.
+ */
+extern bool
+xen_vm_remove_vcpus_features_force_on(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value);
+
+
+/**
  * Set the VCPUs/features/force_off field of the given VM.
  */
 extern bool
 xen_vm_set_vcpus_features_force_off(xen_session *session, xen_vm vm, struct 
xen_cpu_feature_set *force_off);
+
+
+/**
+ * Add the given value to the VCPUs/features/force_off field of the
+ * given VM.  If the value is already in that Set, then do nothing.
+ */
+extern bool
+xen_vm_add_vcpus_features_force_off(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value);
+
+
+/**
+ * Remove the given value from the VCPUs/features/force_off field of
+ * the given VM.  If the value is not in that Set, then do nothing.
+ */
+extern bool
+xen_vm_remove_vcpus_features_force_off(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value);
 
 
 /**
diff -r 5eb2f333c981 -r a874d1170fbc tools/libxen/src/xen_vm.c
--- a/tools/libxen/src/xen_vm.c Fri Dec 08 11:13:44 2006 +0000
+++ b/tools/libxen/src/xen_vm.c Sat Dec 09 17:16:52 2006 +0000
@@ -1181,6 +1181,22 @@ xen_vm_set_vcpus_params(xen_session *ses
 
 
 bool
+xen_vm_set_vcpus_number(xen_session *session, xen_vm vm, int64_t number)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &abstract_type_int,
+              .u.int_val = number }
+        };
+
+    xen_call_(session, "VM.set_VCPUs_number", param_values, 2, NULL, NULL);
+    return session->ok;
+}
+
+
+bool
 xen_vm_set_vcpus_features_force_on(xen_session *session, xen_vm vm, struct 
xen_cpu_feature_set *force_on)
 {
     abstract_value param_values[] =
@@ -1197,6 +1213,38 @@ xen_vm_set_vcpus_features_force_on(xen_s
 
 
 bool
+xen_vm_add_vcpus_features_force_on(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &xen_cpu_feature_abstract_type_,
+              .u.string_val = xen_cpu_feature_to_string(value) }
+        };
+
+    xen_call_(session, "VM.add_VCPUs_features_force_on", param_values, 2, 
NULL, NULL);
+    return session->ok;
+}
+
+
+bool
+xen_vm_remove_vcpus_features_force_on(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &xen_cpu_feature_abstract_type_,
+              .u.string_val = xen_cpu_feature_to_string(value) }
+        };
+
+    xen_call_(session, "VM.remove_VCPUs_features_force_on", param_values, 2, 
NULL, NULL);
+    return session->ok;
+}
+
+
+bool
 xen_vm_set_vcpus_features_force_off(xen_session *session, xen_vm vm, struct 
xen_cpu_feature_set *force_off)
 {
     abstract_value param_values[] =
@@ -1213,6 +1261,38 @@ xen_vm_set_vcpus_features_force_off(xen_
 
 
 bool
+xen_vm_add_vcpus_features_force_off(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &xen_cpu_feature_abstract_type_,
+              .u.string_val = xen_cpu_feature_to_string(value) }
+        };
+
+    xen_call_(session, "VM.add_VCPUs_features_force_off", param_values, 2, 
NULL, NULL);
+    return session->ok;
+}
+
+
+bool
+xen_vm_remove_vcpus_features_force_off(xen_session *session, xen_vm vm, enum 
xen_cpu_feature value)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &xen_cpu_feature_abstract_type_,
+              .u.string_val = xen_cpu_feature_to_string(value) }
+        };
+
+    xen_call_(session, "VM.remove_VCPUs_features_force_off", param_values, 2, 
NULL, NULL);
+    return session->ok;
+}
+
+
+bool
 xen_vm_set_actions_after_shutdown(xen_session *session, xen_vm vm, enum 
xen_on_normal_exit after_shutdown)
 {
     abstract_value param_values[] =

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.