]> xenbits.xensource.com Git - libvirt.git/commit
util: Don't report CPU frequency for ARM hosts
authorAndrea Bolognani <abologna@redhat.com>
Mon, 11 Dec 2017 15:09:20 +0000 (16:09 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 8 Jan 2018 13:22:53 +0000 (14:22 +0100)
commita63ea8141ba548362242c51c0c7d1570f01a64e2
treea57ca9cbc9e6852572f519c985a1762e7b30ad6b
parent6512b0ddc1eb32807e0b453ce83d243ae5837193
util: Don't report CPU frequency for ARM hosts

Some ARM platforms, such as the original Raspberry Pi, report the
CPU frequency in the BogoMIPS field of /proc/cpuinfo, so libvirt
parsed that field and returned it through its API.

However, not only many more boards don't report any value there,
but several - including ARMv8-based server hardware, and even the
more recent Raspberry Pi 3 - use this field as originally intended:
to report the BogoMIPS value instead of the CPU frequency.

Since we have no way of detecting how the field is being used,
it's better to report no information at all rather than something
ludicrous like "your shiny 96-core aarch64 virtualization host's
CPUs are running at a whopping 100 MHz".

Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1206353

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/util/virhostcpu.c
tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected
tests/virhostcpudata/linux-armv6l-raspberrypi.expected