From: Bjoern Walk Date: Tue, 19 Dec 2017 10:08:00 +0000 (+0100) Subject: util: virhostcpu: parse frequency information on S390 X-Git-Tag: v4.0.0-rc1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae68dbffe9ad78e58b63b4367b96b41475dc3268;p=thirdparty%2Flibvirt.git util: virhostcpu: parse frequency information on S390 Since kernel version 4.7, processor frequency information is available on S390. Let's adjust the parser so this information shows up for virsh nodeinfo: # virsh nodeinfo CPU model: s390x CPU(s): 8 CPU frequency: 5000 MHz CPU socket(s): 1 Core(s) per socket: 8 Thread(s) per core: 1 NUMA cell(s): 1 Memory size: 16273908 KiB Reviewed-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk --- diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 5b46fab545..013c95bb56 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -600,6 +600,8 @@ virHostCPUParseFrequency(FILE *cpuinfo, prefix = "cpu MHz"; else if (ARCH_IS_PPC(arch)) prefix = "clock"; + else if (ARCH_IS_S390(arch)) + prefix = "cpu MHz dynamic"; if (!prefix) { VIR_WARN("%s is not supported by the %s parser",