- 24 2月, 2017 2 次提交
-
-
由 Pavel Hrdina 提交于
The port is stored in graphics configuration and it will also get released in qemuProcessStop in case of error. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1397440Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Peter Krempa 提交于
Previously the code called virStorageSourceUpdateBlockPhysicalSize which did not do anything on empty drives since it worked only on block devices. After the refactor in c5f61513 it's called for all devices and thus attempts to deref the NULL path of empty drives. Add a check that skips the update of the physical size if the storage source is empty. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1420718
-
- 23 2月, 2017 13 次提交
-
-
由 Marc Hartmayer 提交于
Fix incorrect jump labels in error paths as the stop jump is only needed if the driver has already changed the state. For example 'virAtomicIntInc(&driver->nactive)' will be 'reverted' in the qemuProcessStop call. 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>
-
由 Michal Privoznik 提交于
When a domain needs an access to some device (be it a disk, RNG, chardev, whatever), we have to allow it in the devices CGroup (if it is available), because by default we disallow all the devices. But some of the functions that are responsible for setting up devices CGroup are lacking check whether there is any CGroup available. Thus users might be unable to hotplug some devices: virsh # attach-device fedora rng.xml error: Failed to attach device from rng.xml error: internal error: Controller 'devices' is not mounted Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrange 提交于
In GCC 7 there is a new warning triggered when a switch case has a conditional statement (eg if ... else...) and some of the code paths fallthrough to the next switch statement. e.g. conf/domain_conf.c: In function 'virDomainChrEquals': conf/domain_conf.c:14926:12: error: this statement may fall through [-Werror=implicit-fallthrough=] if (src->targetTypeAttr != tgt->targetTypeAttr) ^ conf/domain_conf.c:14928:5: note: here case VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE: ^~~~ conf/domain_conf.c: In function 'virDomainChrDefFormat': conf/domain_conf.c:22143:12: error: this statement may fall through [-Werror=implicit-fallthrough=] if (def->targetTypeAttr) { ^ conf/domain_conf.c:22151:5: note: here default: ^~~~~~~ GCC introduced a __attribute__((fallthrough)) to let you indicate that this is intentionale behaviour rather than a bug. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
One of the conditions in qemuDomainDeviceCalculatePCIConnectFlags was missing a break that could result it in falling through to an incorrect codepath. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The libxl code was checking that a 'char *' was != '\0', instead of checking the first element in the string Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
GCC 7 gets upset by if (!tmp && (size * count)) warning util/viralloc.c: In function 'virReallocN': util/viralloc.c:246:23: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] if (!tmp && (size * count)) { ~~~~~~^~~~~~~~ Keep it happy by adding != 0 to the right hand expression so it realizes we really are wanting to treat the result of the arithmetic expression as a boolean Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Nikolay Shirokovskiy 提交于
Current code for example can call unsubscribe if connection succeeds but subscribing fails. This will probabaly lead only to spurious error messages without any actual inconsistencies but nevertheless.
-
由 John Ferlan 提交于
Alter the formatting of each line to not give the appearance of one long run-on sentence and to be consistent between the various elements of collected/displayed data. The formatting should fit within the 80 character display. This removes the need for commas at the end of each line.
-
由 Andrea Bolognani 提交于
qemuDomainAssignPCIAddresses() hardcoded the assumption that the only way to support devices on a non-zero bus is to add one or more pci-bridges; however, since we now support a large selection of PCI controllers that can be used instead, the assumption is no longer true. Moreover, this check was always redundant, because the only sensible time to check for the availability of pci-bridge is when building the QEMU command line, and such a check is of course already in place. In fact, there were *two* such checks, but since one of the two was relying on the incorrect assumption explained above, and it was redundant anyway, it has been dropped.
-
由 Andrea Bolognani 提交于
Up until a while ago, libvirt would automatically add a legacy PCI controllers combo (dmi-to-pci-bridge + pci-bridge) to any PCIe machine type (x86_64/q35 and aarch64/virt). As a result, a number of input and output files in the test suite ended up containing the legacy PCI controllers, even though they are not needed or in any way relevant to the feature being tested. Get rid of most of the occurrences. Most of the time, this just means removing the controllers from the input file and regenerating the output files; in a few instances, some minor tweaking is performed on the input file, most notably removing the memory balloon: as memory balloon support was not the scope of the test being changed, there is no loss of test coverage from doing so. Several occurrences of the legacy PCI controllers remain in the test suite, both because removing their usage would have required even more tweaking, and because we still want to have coverage of this perfectly valid combination.
-
由 Andrea Bolognani 提交于
When switching over the values in the virDomainControllerModelPCI enumeration, make sure the proper cast is in place so that the compiler can warn us when the coverage is not exaustive. For the same reason, remove the 'default' case from one of the existing switch statements.
-
由 Andrea Bolognani 提交于
When switching over the values in the virDomainControllerModelPCI enumeration, make sure the proper cast is in place so that the compiler can warn us when the coverage is not exaustive. For the same reason, fold some unstructured checks (performed by comparing directly against some values in the enumeration) inside an existing switch statement.
-
由 Andrea Bolognani 提交于
The switch in virDomainPCIControllerModelToConnectType() had some code that, while techically part of the _PCIE_SWITCH_DOWNSTREAM_PORT case, was in fact dead due to the early return. Get rid of the dead code, and fix the inaccurate function description while at it.
-
- 22 2月, 2017 15 次提交
-
-
由 John Ferlan 提交于
It's not really 'Chardev' specific - we can reuse this for other objects. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
virCPUDef.arch is not required to be filled in for guest CPU definitions. It doesn't make sense to artificially mandate it to be set when cpuDecode is called especially when virCPUData.arch passed to cpuDecode already contains the architecture. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The CPU model info formating code in virQEMUCapsFormatCache will get more complicated soon. Separating the code in virQEMUCapsFormatHostCPUModelInfo will make the result easier to read. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
All features the function is currently supposed to filter out are specific to x86_64. We should avoid removing them on other architectures. It seems to be quite unlikely other achitectures would use the same names, but one can never be sure. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The guest CPU definition has always been updated automatically during migration. And currently we just transform any host-model CPU into a custom one when a domain starts. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Tomáš Golembiovský 提交于
The 'raw' block driver in Qemu is not directly interesting from libvirt's perspective, but it can be layered above some other block drivers and this may be interesting for the user. The patch adds support for the 'raw' block driver. The driver is treated simply as a pass-through and child driver in JSON is queried to get the necessary information. Signed-off-by: NTomáš Golembiovský <tgolembi@redhat.com>
-
由 Tomáš Golembiovský 提交于
Split virStorageSourceParseBackingJSON into two functions so that the core can be reused by other functions. The new function called virStorageSourceParseBackingJSONInternal accepts virJSONValuePtr. Signed-off-by: NTomáš Golembiovský <tgolembi@redhat.com>
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Create a new set of sub-packages containing the new storage driver modules so that certain heavy-weight backends (gluster, rbd) can be installed separately only if required. To keep backward compatibility the 'libvirt-driver-storage' package will be turned into a virtual package pulling in all the new storage backend sub-packages. The storage driver module will be moved into libvirt-driver-storage-core including the filesystem backend which is mandatory. This then allows to make libvirt-daemon-driver-qemu depend only on the core of the storage driver. All other meta-packages still depend on the full storage driver and thus pull in all the backends.
-
由 Peter Krempa 提交于
Add a new storage driver registration function that will force the backend code to fail if any of the storage backend modules can't be loaded. This will make sure that they work and are present.
-
由 Peter Krempa 提交于
If driver modules are enabled turn storage driver backends into dynamically loadable objects. This will allow greater modularity for binary distributions, where heavyweight dependencies as rbd and gluster can be avoided by selecting only a subset of drivers if the rest is not necessary. The storage modules are installed into 'LIBDIR/libvirt/storage-backend/' and users can override the location by using 'LIBVIRT_STORAGE_BACKEND_DIR' environment variable. rpm based distros will at this point install all the backends when libvirt-daemon-driver-storage package is installed.
-
由 Peter Krempa 提交于
Explicitly enable --with-storage-scsi and disable --without-storage-zfs and --without-storage-vstorage so that the configure script doesn't check for them. Note that --with-storage-dir is enabled by default.
-
由 Michal Privoznik 提交于
Our virSomeEnumTypeFromString() functions return either the value of item from the enum or -1 on error. Usually however the value 0 means 'this value is not set in the domain XML, use some sensible default'. Therefore, we don't accept corresponding string in domain XML, for instance: <memoryBacking> <source mode="none"/> <access mode="default"/> <allocation mode="none"/> </memoryBacking> should be rejected as invalid XML. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 2月, 2017 10 次提交
-
-
由 John Ferlan 提交于
Fix a leak introduced by 4337bc57 when VIR_STRDUP'g the parent.
-
由 John Ferlan 提交于
Rather than the inlined VIR_FREE's, use a cleanup: label... Fixes an issue introduced by 03346def where @name was free'd before usage in a virAsprintf to format scsi_host_name.
-
由 Marc Hartmayer 提交于
The functions in virCommand() after fork() must be careful with regard to accessing any mutexes that may have been locked by other threads in the parent process. It is possible that another thread in the parent process holds the lock for the virQEMUDriver while fork() is called. This leads to a deadlock in the child process when 'virQEMUDriverGetConfig(driver)' is called and therefore the handshake never completes between the child and the parent process. Ultimately the virDomainObjectPtr will never be unlocked. It gets much worse if the other thread of the parent process, that holds the lock for the virQEMUDriver, tries to lock the already locked virDomainObject. This leads to a completely unresponsive libvirtd. It's possible to reproduce this case with calling 'virsh start XXX' and 'virsh managedsave XXX' in a tight loop for multiple domains. This commit fixes the deadlock in the same way as it is described in commit 61b52d2e. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Test that the vcpu entity selection code works properly
-
由 Peter Krempa 提交于
Add code that validates user's selection of cores and then uses the existing code to plug in the vCPU.
-
由 Peter Krempa 提交于
Add a simple virsh command handler which makes use of the new API.
-
由 Peter Krempa 提交于
Similarly to domainSetGuestVcpus this commit adds API which allows to modify state of individual vcpus rather than just setting the count. This allows to enable CPUs in specific guest NUMA nodes to achieve any necessary configuration.
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
With that users could access files outside /dev/shm. That itself isn't a security problem, but might cause some errors we want to avoid. So let's forbid slashes as we do with domain and volume names and also mention that in the schema. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1395496Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-