- 29 1月, 2018 4 次提交
-
-
由 Erik Skultety 提交于
This is a replacement for the existing udevPCIGetMdevTypesCap which is static to the udev backend. This simple helper constructs the sysfs path from the device's base path for each mdev type and queries the corresponding attributes of that type. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
This should serve as a replacement for the existing udevFillMdevType which is responsible for fetching the device type's attributes from the sysfs interface. The problem with the existing solution is that it's tied to the udev backend. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
This is later going to replace the existing virNodeDevCapMdevType, since: 1) it's going to couple related stuff in a single module 2) util is supposed to contain helpers that are widely accessible across the whole repository. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
There were some leftovers from early development which never got used. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 26 1月, 2018 6 次提交
-
-
由 Daniel P. Berrangé 提交于
The flock() function and d_type field in struct dirent are not portable to the mingw platform. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Martin Kletzander 提交于
With this commit we finally have a way to read and manipulate basic resctrl settings. Locking is done only on exposed functions that read/write from/to resctrlfs. Not in functions that are exposed in virresctrlpriv.h as those are only supposed to be used from tests. More information about how resctrl works: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/x86/intel_rdt_ui.txtSigned-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This will make the current functions obsolete and it will provide more information to the virresctrl module so that it can be used later. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Just to ease the review of following patches. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 25 1月, 2018 1 次提交
-
-
由 Daniel P. Berrange 提交于
The OEM strings table in SMBIOS allows the vendor to pass arbitrary strings into the guest OS. This can be used as a way to pass data to an application like cloud-init, or potentially as an alternative to the kernel command line for OS installers where you can't modify the install ISO image to change the kernel args. As an example, consider if cloud-init and anaconda supported OEM strings you could use something like <oemStrings> <entry>cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/</entry> <entry>anaconda:method=http://dl.fedoraproject.org/pub/fedora/linux/releases/25/x86_64/os</entry> </oemStrings> use of a application specific prefix as illustrated above is recommended, but not mandated, so that an app can reliably identify which of the many OEM strings are targetted at it. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 20 1月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
Commit 8708ca01 added virNetDevSwitchdevFeature() to check if a network device has Switchdev capabilities. virNetDevSwitchdevFeature() attempts to retrieve the PCI device associated with the network device, ignoring non-PCI devices. It does so via the following call chain virNetDevSwitchdevFeature()->virNetDevGetPCIDevice()-> virPCIGetDeviceAddressFromSysfsLink() For non-PCI network devices (qeth, Xen vif, etc), virPCIGetDeviceAddressFromSysfsLink() will report an error when virPCIDeviceAddressParse() fails. virPCIDeviceAddressParse() also logs an error. After commit 8708ca01 there are now two errors reported for each non-PCI network device even though the errors are harmless. To avoid the errors, introduce virNetDevIsPCIDevice() and use it in virNetDevGetPCIDevice() before attempting to retrieve the associated PCI device. virNetDevIsPCIDevice() uses the 'subsystem' property of the device to determine if it is PCI. See the sysfs rules in kernel documentation for more details https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html
-
- 12 1月, 2018 2 次提交
-
-
由 Bjoern Walk 提交于
Let's also parse the available processor frequency information on S390 so that it can be utilized by virsh sysinfo: # virsh sysinfo <sysinfo type='smbios'> ... <processor> <entry name='family'>2964</entry> <entry name='manufacturer'>IBM/S390</entry> <entry name='version'>00</entry> <entry name='max_speed'>5000</entry> <entry name='serial_number'>145F07</entry> </processor> ... </sysinfo> 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>
-
由 Michal Privoznik 提交于
For two string lists merge one into the other one. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 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 2 次提交
-
-
由 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>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 03 1月, 2018 4 次提交
-
-
由 Peter Krempa 提交于
PROBE macro adds a logging entry, when used in places seeing a lot of traffic this can cause a significant slowdown.
-
由 Chen Hanxiao 提交于
There are a few more description-related issues that commit @9026d115 forgot to address. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Cédric Bosdonnat 提交于
Add a function to filter a string based on a list of valid characters.
-
由 Chen Hanxiao 提交于
There's no argument named @result, use @matches instead. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 14 12月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
This will be the first private piece of data that will need to be stored in the XML for some drivers. Add helpers which will do it.
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1523564 If the vhost-scsi device file cannot be found, the generic error "error: An error occurred, but the cause is unknown" is returned. Let's add a real error message to make it clear why the failure occurred.
-
由 John Ferlan 提交于
We cannot be sure someone initialized the passed *vhostfd and we certainly don't want or need to be calling VIR_FORCE_CLOSE on what probably is -1. So let's just return -1 immediately.
-
- 13 12月, 2017 2 次提交
-
-
由 Marc Hartmayer 提交于
Replace the error message during startup of libvirtd with an info message if audit_level < 2 and audit is not supported by the kernel. Audit is not supported by the current kernel if the kernel does not have audit compiled in or if audit is disabled (e.g. by the kernel cmdline). Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrange 提交于
Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 12月, 2017 1 次提交
-
-
由 Chen Hanxiao 提交于
Since commit 5e5019bf, we've no longer use VIR_ERR_AGENT_UNSYNCED anymore. Mark it as DEPRECATED. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 12月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
The manual page clearly states that gettid() is Linux-specific and should not be used in programs that are intended to be portable. Unfortunately, it looks like macOS implemented the functionality and defined SYS_gettid accordingly, only to deprecate syscall() altogether with 10.12 (Sierra), released last late year. To avoid compilation errors, call gettid() on Linux only. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 24 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Some drive backends allow output of debugging information which can be configured using properties of the image. Add fields to virStorageSource which will allow configuring them.
-
- 23 11月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
And use it instead of a magic 1024 constant. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Martin Kletzander 提交于
Do not access any data if strlen() == 0. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 18 11月, 2017 5 次提交
-
-
由 Martin Kletzander 提交于
Sometimes the size of the bitmap matters and it might not be guessed correctly when parsing from some type of input. For example virBitmapNewData() has Byte granularity, virBitmapNewString() has nibble granularity and so on. virBitmapParseUnlimited() can be tricked into creating huge bitmap that's not needed (e.g.: "0-2,^99999999"). This function provides a way to shrink the bitmap. It is not supposed to free any memory. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Martin Kletzander 提交于
Already introduced in the past with 9479642f, but then renamed to virBitmapIntersect by a908e9e4. This time we'll really use it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Martin Kletzander 提交于
Our bitmaps can be represented as data (raw bytes for which we have virBitmapNewData() and virBitmapToData()), human representation (list of numbers in a string for which we have virBitmapParse() and virBitmapFormat()) and hexadecimal string (for which we have only virBitmapToString()). So let's add the missing complement for the last one so that we can parse hexadecimal strings. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Martin Kletzander 提交于
Truncate the output so that it is only as big as is needed to fit all the bits, not all the units from the map. This will be needed in the future in order to properly format bitmaps for kernel's sysfs files. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Martin Kletzander 提交于
It is literally only a wrapper around virBitmapNewData() and virBitmapFormat(), only the naming was wrong since it was introduced. And because we have virBitmap*String functions where the meaning of the 'String' is constant, this might confuse someone. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-