- 23 11月, 2018 2 次提交
-
-
由 Michal Privoznik 提交于
The function currently takes virDomainObjPtr because it's using both: the domain definition and domain private data. Unfortunately, this means that in prepare phase we can't parse migration cookie before putting incoming domain def onto domain objects list (addressed in the very next commit). Change the arguments so that virDomainDef and private data are passed instead of virDomainObjPtr. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
There are several functions called in the cleanup path. Some of them do report error (e.g. qemuDomainRemoveInactiveJob()) which may result in overwriting an error reported earlier with some less useful message. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 22 11月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
virt-aa-helper needs to grant QEMU access to VFIO MDEV devices. This extends commit 74e86b6b which only covered PCI hostdevs for VFIO-PCI assignment by now also covering vfio MDEVs. It has still the same limitations regarding the device lifecycle, IOW we're unable to predict the actual VFIO device being created, thus we need wildcards. Also note that the hotplug case, where apparmor is able to detect the actual VFIO device during runtime, is already covered by commit 606afafb. Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
-
- 21 11月, 2018 1 次提交
-
-
由 Wang Huaqiang 提交于
The path argument of virFileIsDir should be a full name of file, pathname and filename. Fixed it by passing the full path name to virFileIsDir. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 20 11月, 2018 2 次提交
-
-
由 Martin Kletzander 提交于
Since the functions only return 0 or 1, they should return bool. I missed the change when "refactoring" the first commit. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
The virGet*ID() functions should be called only if the user exists not when it doesn't. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 11月, 2018 13 次提交
-
-
由 John Ferlan 提交于
Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Add a command to allow for setting various dynamic IOThread polling interval scope (poll-max-ns, poll-grow, and poll-shrink). Describe the values in the virsh.pod in as generic terms as possible. The more specific QEMU algorithm has been divulged in the previous patch. Based heavily on code originally posted by Pavel Hrdina <phrdina@redhat.com>, but altered to only provide one command and to not managed a poll disabled state. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1545732 Implement the QEMU driver mechanism in order to set the polling parameters for an IOThread within the bounds specified by the QEMU qapi parameter passing. Based heavily on patches originally posted by Pavel Hrdina <phrdina@redhat.com>, but modified to only handle alterations for a running guest. For the most part the API names changed, the typed parameters removed the poll enabled value, and the capabilities check was moved to just before the live attempt to set. Since changes are only supported for a running guest, no guest XML alterations were kept. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Add a capability check for IOThread polling (all were added at the same time, so only one check is necessary). Based on code originally posted by Pavel Hrdina <phrdina@redhat.com> with the only changes to include the more recent QEMU releases. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Rather than passing an iothread_id, let's pass a qemuMonitorIOThreadInfo structure so that a subsequent change to modify the iothread info can just generate and pass one. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
We're about to add a new state "modify" and thus the function goes from just Add/Del. Use an enum to manage. Extracted from code originally posted by Pavel Hrdina <phrdina@redhat.com>, but placed into a separate patch. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Add functions to set the IOThreadInfo param data for the live guest. Modify the _qemuMonitorIOThreadInfo to have a flag to indicate when a value was set so that we don't set a value unless it was desired to be set. Based on code originally posted by Pavel Hrdina <phrdina@redhat.com>, but extracted into a separate patch. Note that qapi expects to receive integer parameters rather than unsigned long long or unsigned int's. QEMU does save the value in larger signed 64 bit values eventually. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Create a new API that will allow an adjustment of IOThread polling parameters for the specified IOThread. These parameters will not be saved in the guest XML. Currently the only parameters supported will allow the hypervisor to adjust the parameters used to limit and alter the scope of the polling interval. The polling interval allows the IOThread to spend more or less time processing in the guest. Based on code originally posted by Pavel Hrdina <phrdina@redhat.com> to add virDomainAddIOThreadParams and virDomainModIOThreadParams. Modification of those changes to use virDomainSetIOThreadParams instead and remove concepts related to saving the data in guest XML as well as the way to specifically enable the polling parameters. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Add an --iothread qualifier to domstats and an explanation in the man page. Describe the values in as generic terms as possible allowing each hypervisor to provide a specific algorithm to utilize the values as it sees fit. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Process the IOThreads polling stats if available. Generate the output params record to be returned to the caller with the three values - poll-max-ns, poll-grow, and poll-shrink. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Separate out the fetch of the IOThread monitor call into a separate helper so that a subsequent domain statistics change can fetch the raw IOThread data and parse it as it sees fit. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
If there are IOThread polling values in the query-iothreads return buffer, then fill them in and set a bool indicating their presence. This will allow for displaying in a domain stats output eventually. Note that the QEMU values are managed a bit differently (as int's stored in int64_t's) than we will manage them (as unsigned long and int values). This is intentional to allow for value validation checking when it comes time to provide the values to QEMU. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 ZhiPeng Lu 提交于
Item redundancy, some forgotten extra blank lines, etc. Signed-off-by: NZhiPeng Lu <luzhipeng@uniudc.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 18 11月, 2018 1 次提交
-
-
由 Pavel Hrdina 提交于
Introduced-by: c3a208afReported-by: NRadoslaw Biernacki <radoslaw.biernacki@linaro.org> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 17 11月, 2018 3 次提交
-
-
由 Andrea Bolognani 提交于
virXMLFormatElement() might fail, but we were not checking its return value. Fixing this requires us to change virDomainDeviceInfoFormat() so that it can report an error back to the caller. Introduced-by: 0d6b8733 Spotted-by: Coverity Reported-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
In many cases, an early exit from a function would cause memory allocated by local virBuffer instances not to be released. Provide proper cleanup paths to solve the issue. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
This avoids setting 'ret' multiple times, which will result in errors being masked if the first operation fails but the second one succeeds. Introduced-by: f183b87f Spotted-by: Coverity Reported-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 16 11月, 2018 17 次提交
-
-
由 Michal Privoznik 提交于
Revert "virlockspace: Allow caller to specify start and length offset in virLockSpaceAcquireResource" This reverts commit afd5a275. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 21c34b86. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 22baf6e0. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit aaf34cb9. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 997283b5. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 385eb839. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 35b5b244. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 8b8aefb3. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 3e26b476. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Trying to use virlockd to lock metadata turns out to be too big gun. Since we will always spawn a separate process for relabeling we are safe to use thread unsafe POSIX locks and take out virtlockd completely out of the picture. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
When metadata locking is enabled that means the security commit processing will be run in a fork similar to how namespaces use fork()'s for processing. This is done to ensure libvirt can properly and synchronously modify the metadata to store the original owner data. Since fork()'s (e.g. virFork) have been seen as a performance bottleneck being able to disable them allows the admin to choose whether the performance 'hit' is worth the extra 'security' of being able to remember the original owner of a lock. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
For metadata locking we might need an extra fork() which given latest attempts to do fewer fork()-s is suboptimal. Therefore, there will be a qemu.conf knob to {en|dis}able this feature. But since the feature is actually not metadata locking itself rather than remembering of the original owner of the file this is named as 'rememberOwner'. But patches for that feature are not even posted yet so there is actually no qemu.conf entry in this patch nor a way to enable this feature. Even though this is effectively a dead code for now it is still desired. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
The TPM code currently accepts pointer to a domain definition. This is okay for now, but in near future the security driver APIs it calls will require domain object. Therefore, change the TPM code to accept the domain object pointer. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Both virProcessRunInMountNamespace() and virProcessRunInFork() look very similar. De-duplicate the code and make virProcessRunInMountNamespace() call virProcessRunInFork(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This new helper can be used to spawn a child process and run passed callback from it. This will come handy esp. if the callback is not thread safe. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc-André Lureau 提交于
Add a new memoryBacking source type "memfd", supported by QEMU (when the capability is available). A memfd is a specialized anonymous memory kind. As such, an anonymous source type could be automatically using a memfd. However, there are some complications when migrating from different memory backends in qemu (mainly due to the internal object naming at this point, but there could be more). For now, it is simpler and safer to simply introduce a new source type "memfd". Eventually, the "anonymous" type could learn to use memfd transparently in a separate change. The main benefits are that it doesn't need to create filesystem files, and it also enforces sealing, providing a bit more safety. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
QEMU 3.1 should only expose the property if the host is actually capable of creating hugetable-backed memfd. However, it may fail at runtime depending on requested "hugetlbsize". Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-