- 27 1月, 2020 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 1月, 2020 6 次提交
-
-
由 Jonathon Jongsma 提交于
If a domain is configured to have an egl-headless display and a virtio video device, virgl will be enabled automatically within the guest, even if the video device is configured with accel3d='no'. In this case we should explicitly pass 'virgl=off' to qemu. See https://bugzilla.redhat.com/show_bug.cgi?id=1791236 for more information. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Han Han 提交于
Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Han Han 提交于
Since v4.2-rc0, QEMU introduced a builtin rng backend that uses getrandom() syscall to generate random. Add it to libvirt with the backend model 'builtin'. https://bugzilla.redhat.com/show_bug.cgi?id=1785091Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Han Han 提交于
The 'builtin' rng backend model can be used as following: <rng model='virtio'> <backend model='builtin'/> </rng> Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Han Han 提交于
For qemu object like rng-builtin, there are no properties after id property. We should always set comma after object id. Otherwise it will cause trailing comma on object: -object rng-builtin,id=ID, Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Han Han 提交于
It is used to check if qemu is capable of rng-builtin object. This object is added since qemu-4.2.0-rc0, commit 6c4e9d48. Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 1月, 2020 15 次提交
-
-
由 Michal Privoznik 提交于
Since v5.6.0-48-g270583ed we try to cache domain capabilities, i.e. store filled virDomainCaps in a hash table in virQEMUCaps for future use. However, there's a race condition in the way it's implemented. We use virQEMUCapsGetDomainCapsCache() to obtain the pointer to the hash table, then we search the hash table for cached data and if none is found the domcaps is constructed and put into the table. Problem is that this is all done without any locking, so if there are two threads trying to do the same, one will succeed and the other will fail inserting the data into the table. Also, the API looks a bit fishy - obtaining pointer to the hash table is dangerous. The solution is to use a mutex that guards the whole operation with the hash table. Then, the API can be changes to return virDomainCapsPtr directly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1791790Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
When fixing [1] I've ran attached reproducer and had it spawn 1024 threads and query capabilities XML in each one of them. This lead libvirtd to hit the RLIMIT_NOFILE limit which was kind of expected. What wasn't expected was a subsequent segfault. It happened because virCPUProbeHost failed and returned NULL. We've taken the NULL and passed it to virCapabilitiesHostNUMARef() which dereferenced it. Code inspection showed the same flas in virQEMUDriverGetHostNUMACaps(), so I'm fixing both places. 1: https://bugzilla.redhat.com/show_bug.cgi?id=1791790Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
The virCapabilitiesGetNodeInfo() function has the usual return value semantics for integeres: a negative value means an error, zero or a positive value means success. However, the function call done in virCPUProbeHost() doesn't check for the return value accordingly. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Don't use ERANGE as it doesn't make much sense in the error message. Also point out that the reply from qemu was too large which is not obvious from the original error: error: No complete monitor response found in 10485760 bytes: Numerical result out of range The new message will read: error: internal error: QEMU monitor reply exceeds buffer size (10485760 bytes) Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Peter Krempa 提交于
libvirt treats 'luks' images as raw+encryption. The logic in qemuBlockStorageSourceCreateFormat skipped the creation if the requested image was raw but didn't take into account the encryption. This manifested itself e.g. when attempting to do a virsh blockcopy with the following XML: <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/tmp/enccpy'> <encryption format='luks'> <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/> </encryption> </source> </disk> Where qemu would report the following error: unable to execute QEMU command 'blockdev-add': Volume is not in LUKS format rather than actually formatting the image first. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Test that adding a duplicate entry is rejected properly. This also allows to see the error message of the duplicate key addition in verbose mode. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
If we get a user reporting this error message being shown it's pretty useless in terms of actually debugging it since we don't know which hash and which key are actually subject to the error. This patch adds a new hash table callback which formats the user-readable version of the hash key and reports it in the new message which will look like: "Duplicate hash table key 'blah'" That way we will at least have an anchor point where to start the search. There are two special implementations of keys which are numeric so we add specific printer functions for them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Use the user-configured name of the bitmap when merging the appropriate bitmaps for an incremental backup so that the user can see it as configured. Additionally expose the default bitmap name if nothing is configured. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Peter Krempa 提交于
Pass the exportname as configured when exporting the image via NBD and fill it with the default if it's not configured. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
If users wish to use different name for exported disks or bitmaps the new fields allow to do so. Additionally they also document the current settings. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
When using blockdev configurations the 'device' argument of 'blockdev-commit' must correspond to the topmost node in the block node graph. Libvirt didn't do this properly in case when 'copy_on_read' option was enabled on the disk. Use qemuDomainDiskGetTopNodename to fix it when calling block-commit. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
When using blockdev configurations the 'device' argument of 'blockdev-mirror' must correspond to the topmost node in the block node graph. Libvirt didn't do this properly in case when 'copy_on_read' option was enabled on the disk. Use qemuDomainDiskGetTopNodename to fix it for the blockdev-mirror calls in qemuDomainBlockCopy and the non-shared-storage migration. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
There are more places which require getting the topmost nodename to be passed to qemu. Separate it out into a new function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
If a mirror job fails to start in -blockdev mode we'd not unplug the backing files we added first because the code on the error path checked the wrong value. 'rc' is used as status of the code which added the images, but the state of the 'block(dev)-mirror' call is stored in 'ret' at that point. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Daniel P. Berrangé 提交于
The virConnectGetDomainCapabilities API accepts either a binary path to the emulator, or desired guest arch. If guest arch is not given, then the host arch is assumed. In the case where the binary is not given, the code tried to find the emulator binary in the existing list of cached emulator capabilities. This is not valid since we switched to lazy population of the cache in: commit 3dd91af0 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Mon Dec 2 13:04:26 2019 +0000 qemu: stop creating capabilities at driver startup As a result of this change, if there are no persistent guests defined using the requested guest architecture, virConnectGetDomainCapabilities will fail to find an emulator binary. The solution is to stop relying on the cached capabilities to find the binary and instead use the same logic we use to pick default a binary per arch when populating capabilities. Tested-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Tested-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 23 1月, 2020 5 次提交
-
-
由 Thomas Huth 提交于
The "ps2" bus is only available on certain machines like x86. On machines like s390x, we should refuse to add a device to this bus instead of silently ignoring it. Looking at the QEMU sources, PS/2 is only available if the QEMU binary has the "i8042" device, so let's check for that and only allow "ps2" devices if this QEMU device is available, or if we're on x86 anyway (so we don't have to fake the QEMU_CAPS_DEVICE_I8042 capability in all the tests that use <input ... bus='ps2'/> in their xml data). Reported-by: NSebastian Mitterle <smitterl@redhat.com> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1763191Signed-off-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Julio Faracco 提交于
LXC driver is not able to retrieve IP addresses from domains. This function was not implemented yet. It can be done using DHCP lease and ARP table. Different from QEMU, LXC does not have an agent to fetch this info, but other sources can be used. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Julio Faracco 提交于
QEMU driver has two functions: qemuGetDHCPInterfaces() and qemuARPGetInterfaces() that are being used inside only one single function. They can be turned into generic functions that other drivers can use. This commit move both from QEMU driver tree to domain conf tree. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jonathon Jongsma 提交于
Simplify function logic by using g_autofree to free local variables so that we can remove some goto statements that are used for cleanup. Introduce a g_autoptr cleanup function for virNodeDeviceDef. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Pavel Hrdina 提交于
Since commit <60d9ad6f> we require GnuTLS and since commit <ac0d21c7> we can actually drop the usage of WITH_GNUTLS. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 22 1月, 2020 2 次提交
-
-
由 Christian Ehrhardt 提交于
If virHostdevManagerGetDefault in qemuhotplugtest fails it works for quite a while to later segfault when accessing mgr->activePCIHostdevs. Report the error details and break on a failed init to see the real issue right away. Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
The libxl driver already tries to call shutdown inhibit callback in the right places, but only if it's set. That last part was missing, resulting in premature shutdown when running libvirtd --timeout=... Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
- 21 1月, 2020 2 次提交
-
-
由 Richard W.M. Jones 提交于
You normally want to run the locally compiled copy of virsh. Trying to run the installed version with the locally compiled library is a recipe for problems with missing symbols and so on. By adding tools to the path we can ensure that (eg) the libguestfs test suite will use compatible copies of the library and virsh. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Richard W.M. Jones 提交于
This has been used in libguestfs and libnbd for quite a while as it makes the ./run script easier to read and write. See also: http://stackoverflow.com/a/9631350Signed-off-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 1月, 2020 1 次提交
-
-
由 Ján Tomko 提交于
This function grabs an agent job but ends a monitor job. End the agent job instead. https://bugzilla.redhat.com/show_bug.cgi?id=1792723Signed-off-by: NJán Tomko <jtomko@redhat.com> Reported-by: NDan Zheng <dzheng@redhat.com> Fixes: e005c95f
-
- 17 1月, 2020 8 次提交
-
-
由 Julio Faracco 提交于
This is only 2 simple typo fixes for wrong documentation wording. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Running bootstrap and autoreconf from autogen.sh produced different files in build-aux directory. The reason is that gnulib usually have newer version of these files and overwrites them after the autoreconf step. In order to fix it remove the --install and --force options, in addition introduce --verbose option in order to reflect what bootstrap is doing. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
The existence of AUTHORS file is required for GNU projects but since commit <8bfb36db> we do not require these files to exist. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
We already ignore most of these files and the .gitignore files as well. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Preparation for having bootstrap result in git. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
We are in process of removing gnulib and adopting meson as our build system. In order to help with the transition let's drop gnulib tests. This will also help with the fact that before we will be able to drop gnulib completely we will store output of bootstrap in git. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-