- 11 1月, 2018 1 次提交
-
-
由 Bjoern Walk 提交于
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: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 08 1月, 2018 4 次提交
-
-
由 Andrea Bolognani 提交于
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=1206353Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
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: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Andrea Bolognani 提交于
Instead of a generic "your architecture", print the actual architecture name. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Bjoern Walk 提交于
All different architectures use the same copy-pasted code to parse processor frequency information from /proc/cpuinfo. Let's extract that code into a function to avoid repetition. We now also tolerate if the parsing of /proc/cpuinfo is not successful and just report a warning instead of bailing out and abandoning the rest of the CPU information. Reviewed-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 04 1月, 2018 1 次提交
-
-
由 Paolo Bonzini 提交于
This new API reads host's CPU microcode version from /proc/cpuinfo. Unfortunately, there is no other way of reading microcode version which would be usable from both system and session daemon. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 30 5月, 2017 1 次提交
-
-
由 Nitesh Konkar 提交于
Callers expect the return value to be the total number of vcpus in the host (including offline vcpus). The refactor in c67e04e2 broke this assumption by using virHostCPUGetOnlineBitmap which only creates a bitmap long enough to hold the last online vcpu. Report the full number of host vcpus by returning value from virHostCPUGetCount(). Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 09 5月, 2017 2 次提交
-
-
由 Martin Kletzander 提交于
The code is already prepared to handle the non-existence of it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
It is no longer needed thanks to the great virfilewrapper.c. And this way we don't have to add a new set of functions for each prefixed path. While on that, add two functions that weren't there before, string and scaled integer reading ones. Also increase the length of the string being read by one to accompany for the optional newline at the end (i.e. change INT_STRLEN_BOUND to INT_BUFSIZE_BOUND). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 27 4月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
We prefer c89 style of comments. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 4月, 2017 1 次提交
-
-
由 Martin Kletzander 提交于
And use it in virFileRead* Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 27 3月, 2017 2 次提交
-
-
由 Martin Kletzander 提交于
Previously, this function must've been called only on Linux in order to fail gracefully. That lead to #ifdef mess in callers, so the function was redesigned so it failed gracefully on non-existing files. However that commit forgot to define the function outside the __linux__ ifdef, it broke non-Linux builds. Caused by c67e04e2. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
While on that, drop support for kernels from RHEL-5 era (missing cpu/present file). Also add some useful functions and export them. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 14 12月, 2016 1 次提交
-
-
由 Viktor Mihajlovski 提交于
The functions to retrieve online and present host CPU information are only supported on Linux for the time being. This leads to runtime errors if these function are used on other platforms. To avoid that, code in higher levels using the functions must replicate the conditional compilation in higher level which is error prone (and is plainly spoken ugly). Adding a function virHostCPUHasBitmap that can be used to check for host CPU bitmap support. NB: There are other functions including the host CPU count that are lacking support on all platforms, but they are too essential in order to be bypassed. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 24 11月, 2016 1 次提交
-
-
由 Nitesh Konkar 提交于
Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
-
- 16 9月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
There is nothing Linux-specific in that function. Also since commit 8c3b5bf4 mingw build is broken due to the fact that this function is not compiled in the library. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 9月, 2016 1 次提交
-
-
由 Tomáš Ryšavý 提交于
We will need this function shortly when implementing nodeGetCPUStats in the test driver. Signed-off-by: NTomáš Ryšavý <tom.rysavy.0@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 9月, 2016 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Current implementation uses the dev.cpu.0.freq sysctl that is provided by the cpufreq(4) framework and returns the actual CPU frequency. However, there are environments where it's not available, e.g. when running nested in KVM. In this case fall back to hw.clockrate that reports CPU frequency at the boot time. Resolves (hopefully): https://bugzilla.redhat.com/show_bug.cgi?id=1369964
-
- 11 7月, 2016 2 次提交
-
-
由 Andrea Bolognani 提交于
All Linux releases we support (RHEL6 era) include these definitions.
-
由 Andrea Bolognani 提交于
If we don't HAVE_LINUX_KVM_H, we can't query /dev/kvm to discover the limits on the number of vCPUs, so we report an error and return a negative value instead.
-
- 01 7月, 2016 1 次提交
-
-
由 Andrea Bolognani 提交于
Remove the local kvmpath variable from virHostCPUGetThreadsPerSubcore() and use the file-global KVM_DEVICE define instead.
-
- 25 6月, 2016 1 次提交
-
-
由 Shivaprasad G Bhat 提交于
This kvmGetMaxVCPUs() needs to be used at two different places so move it to utils with appropriate name and mark it as private global now. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
-
- 24 6月, 2016 4 次提交
-
-
由 Ján Tomko 提交于
Remove all the remaining usage of opendir.
-
由 Ján Tomko 提交于
Switch from opendir to virDirOpen everywhere we need to report an error.
-
由 Ján Tomko 提交于
Introduce a helper that only calls closedir if DIR* is non-NULL and sets it to NULL afterwards.
-
由 Ján Tomko 提交于
The only possible error is EBADFD. Since we only use the directory stream returned by opendir, this should never happen.
-
- 20 6月, 2016 1 次提交
-
-
由 Ján Tomko 提交于
Most the callers pass 0 in one form or another, including vircapstest which used VIR_ARCH_NONE.
-
- 15 6月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
This function is plenty of ifdefs providing implementations for Linux, *BSD and OS-X. However, if we are being build for any other architecture, all that's left behind by preprocessor is just a error reporting call and return of -1. In that case, passed arguments are unused: ../../src/util/virhostcpu.c: In function 'virHostCPUGetInfo': ../../src/util/virhostcpu.c:966:33: error: unused parameter 'cpus' [-Werror=unused-parameter] unsigned int *cpus, ^~~~ Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 6月, 2016 1 次提交
-
-
由 Roman Bogorodskiy 提交于
* Fix misspelt function name: s/virHostCPUGetStatsFreebsd/virHostCPUGetStatsFreeBSD/ * Mark the first argument to virHostCPUGetInfo with ATTRIBUTE_UNUSED as it's not actually used on non-Linux
-
- 10 6月, 2016 7 次提交
-
-
由 Daniel P. Berrange 提交于
Move all APIs with a virHostCPU name prefix out into new util/virhostcpu.h & util/virhostcpu.c files Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In preparation for moving all the CPU related APIs out of the nodeinfo file, give them a virHostCPU name prefix. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In preparation for moving all the memory related APIs out of the nodeinfo file, give them a virHostMem name prefix. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Instead of having platform specific code in nodeGetInfo to fetch CPU topology, split it all out into a new method nodeGetCPUInfo. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The GNULIB physmem module already provides support for the FreeBSD platform, so there's no reason to re-implement FreeBSD portability code in libvirt. If there are bugs in the GNULIB code, we should fix GNULIB rather than workaround it in libvirt. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The nodeGetInfo() method currently has its own code for getting memory size in KB, that basically just re-invents what nodeGetMemory already does. Remove it and just call nodeGetMemory, converting its result from bytes to KB, allowing removal of more platform specific conditional code. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Nearly all the methods in the nodeinfo file are given a 'const char *sysfs_prefix' parameter to override the default sysfs path (/sys/devices/system). Every single caller passes in NULL for this, except one use in the unit tests. Furthermore this parameter is totally Linux-specific, when the APIs are intended to be cross platform portable. This removes the sysfs_prefix parameter and instead gives a new method linuxNodeInfoSetSysFSSystemPath for use by the test suite. For two of the methods this hardcodes use of the constant SYSFS_SYSTEM_PATH, since the test suite does not need to override the path for thos methods. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 25 12月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
The manpage for sysconf() suggest including unistd.h as the function is declared there. Even though we are not hitting any compile issues currently, let's include the correct header file instead of relying on some hidden include chain. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 8月, 2015 2 次提交
-
-
由 Andrea Bolognani 提交于
Compiler error: ../../src/nodeinfo.c: In function 'nodeGetThreadsPerSubcore': ../../src/nodeinfo.c:2393: error: label 'out' defined but not used [-Wunused-label] ../../src/nodeinfo.c:2352: error: unused parameter 'arch' [-Wunused-parameter]
-
由 Shivaprasad G Bhat 提交于
The nodeinfo is reporting incorrect number of cpus and incorrect host topology on PPC64 KVM hosts. The KVM hypervisor on PPC64 needs only the primary thread in a core to be online, and the secondaries offlined. While scheduling a guest in, the kvm scheduler wakes up the secondaries to run in guest context. The host scheduling of the guests happen at the core level(as only primary thread is online). The kvm scheduler exploits as many threads of the core as needed by guest. Further, starting POWER8, the processor allows splitting a physical core into multiple subcores with 2 or 4 threads each. Again, only the primary thread in a subcore is online in the host. The KVM-PPC scheduler allows guests to exploit all the offline threads in the subcore, by bringing them online when needed. (Kernel patches on split-core http://www.spinics.net/lists/kvm-ppc/msg09121.html) Recently with dynamic micro-threading changes in ppc-kvm, makes sure to utilize all the offline cpus across guests, and across guests with different cpu topologies. (https://www.mail-archive.com/kvm@vger.kernel.org/msg115978.html) Since the offline cpus are brought online in the guest context, it is safe to count them as online. Nodeinfo today discounts these offline cpus from cpu count/topology calclulation, and the nodeinfo output is not of any help and the host appears overcommited when it is actually not. The patch carefully counts those offline threads whose primary threads are online. The host topology displayed by the nodeinfo is also fixed when the host is in valid kvm state. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 23 7月, 2015 1 次提交
-
-
由 Andrea Bolognani 提交于
-