]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add suspend info to Xen, LXC and UML hypervisor capabilities
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Nov 2011 15:28:26 +0000 (15:28 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 30 Nov 2011 10:12:30 +0000 (10:12 +0000)
* src/lxc/lxc_conf.c, src/uml/uml_conf.c,
  src/xen/xen_hypervisor.c: Initialize suspend capabilities
* tests/xencapsdata/*xml: Add empty powermgmt capabilities

13 files changed:
src/lxc/lxc_conf.c
src/uml/uml_conf.c
src/xen/xen_hypervisor.c
tests/xencapsdata/xen-i686-pae-hvm.xml
tests/xencapsdata/xen-i686-pae.xml
tests/xencapsdata/xen-i686.xml
tests/xencapsdata/xen-ia64-be-hvm.xml
tests/xencapsdata/xen-ia64-be.xml
tests/xencapsdata/xen-ia64-hvm.xml
tests/xencapsdata/xen-ia64.xml
tests/xencapsdata/xen-ppc64.xml
tests/xencapsdata/xen-x86_64-hvm.xml
tests/xencapsdata/xen-x86_64.xml

index 52e99ca1c214567410fd81d3bc2c5c185091ff53..e8427364f5196e17ee09b40f21f7dfad22d96b08 100644 (file)
@@ -37,6 +37,8 @@
 #include "uuid.h"
 #include "configmake.h"
 #include "lxc_container.h"
+#include "virnodesuspend.h"
+
 
 #define VIR_FROM_THIS VIR_FROM_LXC
 
@@ -71,6 +73,9 @@ virCapsPtr lxcCapsInit(void)
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
     }
 
+    if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
+        VIR_WARN("Failed to get host power management capabilities");
+
     if (virGetHostUUID(caps->host.host_uuid)) {
         lxcError(VIR_ERR_INTERNAL_ERROR,
                  "%s", _("cannot get the host uuid"));
index d4cb12b0038dead2d9a0009c8ce5c105e46f7c9f..a576047d75e4e75b0b25f513a90a8ed0e867e38d 100644 (file)
@@ -47,6 +47,8 @@
 #include "virfile.h"
 #include "command.h"
 #include "virnetdevtap.h"
+#include "virnodesuspend.h"
+
 
 #define VIR_FROM_THIS VIR_FROM_UML
 
@@ -81,6 +83,9 @@ virCapsPtr umlCapsInit(void) {
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
     }
 
+    if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
+        VIR_WARN("Failed to get host power management capabilities");
+
     if (virGetHostUUID(caps->host.host_uuid)) {
         umlReportError(VIR_ERR_INTERNAL_ERROR,
                        "%s", _("cannot get the host uuid"));
index 870bc4f910a304616b3fbbfd1ce08a36dbb0e570..6c71b65bb55e1c2e20ed98b39679e02f3b3a3b92 100644 (file)
@@ -66,6 +66,7 @@
 #include "capabilities.h"
 #include "memory.h"
 #include "virfile.h"
+#include "virnodesuspend.h"
 
 #define VIR_FROM_THIS VIR_FROM_XEN
 
@@ -2743,6 +2744,9 @@ xenHypervisorMakeCapabilities(virConnectPtr conn)
                                                  cpuinfo,
                                                  capabilities);
 
+    if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
+        VIR_WARN("Failed to get host power management capabilities");
+
     VIR_FORCE_FCLOSE(cpuinfo);
     VIR_FORCE_FCLOSE(capabilities);
 
index 42b099c9b465431be79f91622659e2cf1dedf869..872e5f6698b26f58b90a52b4556ef43f8de74603 100644 (file)
@@ -7,6 +7,7 @@
         <vmx/>
       </features>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index a6cec8a617a683e94321f93db5f45e3177852f6b..3dba6ebbcf6d28c35f31054c7d861fc6477711ee 100644 (file)
@@ -7,6 +7,7 @@
         <vmx/>
       </features>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index 907121215f308b228250b223363e0954bbf09c00..22d7685fcdf3ec1f07751cd2e83867c99bae5694 100644 (file)
@@ -4,6 +4,7 @@
     <cpu>
       <arch>i686</arch>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index 732b6937273a075a23e944be3627fb6a769e06a7..222de1dadb0bfb80be9074174eed1ea33ddf3534 100644 (file)
@@ -4,6 +4,7 @@
     <cpu>
       <arch>ia64</arch>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index 4f133ec60d305b1ddabaf4373ab3192d3790a171..017816c4db758a45a894575f871adad71e1af4a5 100644 (file)
@@ -4,6 +4,7 @@
     <cpu>
       <arch>ia64</arch>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index ef48a95e39694d260499762f6e718abf8c4e5f5c..33c49469c4ed1281efef35773a28597cbacdd576 100644 (file)
@@ -4,6 +4,7 @@
     <cpu>
       <arch>ia64</arch>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index 5570f4dfd97f79784217c7367d4aad7fec87206e..82ce9656254025fdfa182fcb07d5666e6c35d47c 100644 (file)
@@ -4,6 +4,7 @@
     <cpu>
       <arch>ia64</arch>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index 627d79c1419b8411119bea8a99a0e9e07f74c517..91401b938771436564280de1b477444c13addca8 100644 (file)
@@ -4,6 +4,7 @@
     <cpu>
       <arch>ppc64</arch>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index 52c12c616e6775b8d8d77c6e0dff81dce5e8ab5e..8de8cf446826d89275e6778eeec97acd8c4ad18d 100644 (file)
@@ -7,6 +7,7 @@
         <svm/>
       </features>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>
index 0faa43c79167955357a1d2affd76c20ab7e74bce..0c3279bb244197d561bd7413599813a5f4323eda 100644 (file)
@@ -7,6 +7,7 @@
         <svm/>
       </features>
     </cpu>
+    <power_management/>
     <migration_features>
       <live/>
       <uri_transports>