]> xenbits.xensource.com Git - libvirt.git/commitdiff
Document that virNodeGetInfo can return mhz == 0.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 11 May 2015 20:24:36 +0000 (21:24 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 12 May 2015 09:08:43 +0000 (10:08 +0100)
On the s/390x architecture, libvirt may already return 0 in the
node_info->mhz field (see src/nodeinfo.c:linuxNodeInfoCPUPopulate).

We may also want to return this on aarch64 in future, because
calculating the proper value requires SMBIOS, which is not available
on non-server-class systems (specifically on systems which don't
adhere to the SBSA standard).

Therefore this change documents the existing behaviour and provides a
valid path for aarch64.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Bug-URL: https://bugzilla.redhat.com/1206353

include/libvirt/libvirt-host.h

index 953366baab0cb9cdaecffb54d9c1583c76193140..070550bfd5bb82886e4b3cdf4f640fcafb4c5179 100644 (file)
@@ -354,7 +354,8 @@ struct _virNodeInfo {
     char model[32];       /* string indicating the CPU model */
     unsigned long memory; /* memory size in kilobytes */
     unsigned int cpus;    /* the number of active CPUs */
-    unsigned int mhz;     /* expected CPU frequency */
+    unsigned int mhz;     /* expected CPU frequency, 0 if not known or
+                             on unusual architectures */
     unsigned int nodes;   /* the number of NUMA cell, 1 for unusual NUMA
                              topologies or uniform memory access; check
                              capabilities XML for the actual NUMA topology */