Commit Graph

17 Commits

Author SHA1 Message Date
Jiri Denemark
d3d87e0cef hostcpu: Implement virHostCPUGetSignature for s390
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2020-05-25 16:09:58 +02:00
Jiri Denemark
2a68ceaa6e hostcpu: Implement virHostCPUGetSignature for ppc64
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-05-25 16:09:41 +02:00
Jiri Denemark
44f826e4a0 hostcpu: Implement virHostCPUGetSignature for x86
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-05-25 16:09:41 +02:00
Daniel P. Berrangé
0169f5ecde tests: add host CPU data files for validating die_id
Only Cascadelake-AP CPUs appear to report "die_id" values != 0 on Linux
right now - AMD EPYC's don't report "die_id" (at least with Fedora 31
kernel). Lacking access to Cascadelake-AP CPUs, this test data was from
a Fedora 31 QEMU guest launched with

 -cpu qemu64 -smp sockets=2,dies=3,cores=2,threads=1

Ideally we'd replace this data with some from a real machine reporting
"die_id", to ensure we're not mislead by QEMU's impl.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-16 15:11:55 +00:00
Andrea Bolognani
1df3fb7ccb tests: Add linux-high-ids test
This proves libvirt can now handle high socket_id and
core_id values correctly and ensures we won't introduce
regressions in this area.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-08-14 15:52:35 +02:00
Andrea Bolognani
089849d3c4 tests: Drop core_siblings/thread_siblings files
The latter are no longer used by libvirt, and the former
never were; moreover, both have a corresponding *_list
file which we can manipulate very conveniently using our
bitmap APIs, so dropping them makes sure in the future
developers will look into that rather than trying to
parse the kernel binary bitmaps.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-08-14 15:52:33 +02:00
Andrea Bolognani
37e64f6508 tests: Add missing thread_siblings_list files
Some of the data dumps didn't include them; luckily,
we're not actually missing any information since we
can recreate them by looking at the corresponding
thread_sibilings files.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-08-14 15:52:31 +02:00
Andrea Bolognani
22461d6427 tests: Drop unused data
Added by mistake with commit a0fdd2f6f9.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-08-14 15:52:27 +02:00
Andrea Bolognani
8fc732f841 tests: Break symlink loop
distcheck, and possibly more stuff, breaks because of it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-01-11 14:23:09 +01:00
Bjoern Walk
65dace5a96 tests: virhostcputest: testcase for S390 system
Let's add a testcase for a S390 system running kernel version 4.14 on
LPAR.

Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
2018-01-10 17:34:37 -05:00
Andrea Bolognani
a63ea8141b 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>
2018-01-08 14:22:53 +01:00
Andrea Bolognani
6512b0ddc1 util: Improve CPU frequency parsing
Make the parser both more strict, by not ignoring errors reported
by virStrToLong_ui(), and more permissive, by not failing due to
unrelated fields which just happen to have a know prefix and
accepting any amount of whitespace before the numeric value.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
2018-01-08 13:48:44 +01:00
Andrea Bolognani
9ce97d0f7d tests: Add host CPU data for Moonshot (RHEL 7.4)
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-01-08 13:48:39 +01:00
Martin Kletzander
a0fdd2f6f9 tests: Add linux-caches sysfs entries for vircaps2xmltest
Bit more test data, this time with complete info copied, mainly with
cache information, so we can easily add tests for it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2017-03-27 13:13:29 +02:00
Martin Kletzander
15b5e46364 tests: Add cpu/{online,present} files for old tests
The functionality these tests partially relied on (scanning the cpu
directory for cpu[0-9]+ subdirectories) is going to be removed, so we
need additional files that are present on all non-medieval systems.
Removing all these tests would be an option but we would lose the
ability to test the topologies.  Even though we just extract number of
sockets/cores/threads from all these directory trees.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2017-03-27 13:13:29 +02:00
Martin Kletzander
5b5fee00fd tests: Remove some unneeded files
We are not using them at all and the directories are missing bunch of
files already.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2017-03-27 13:13:29 +02:00
Daniel P. Berrange
eaf18f4c2b nodeinfo: move host CPU APIs out into virhostcpu.c file
Move all APIs with a virHostCPU name prefix out into new
util/virhostcpu.h & util/virhostcpu.c files

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-06-09 18:31:11 +01:00