- 05 2月, 2018 10 次提交
-
-
由 Peter Krempa 提交于
Note the fact that the unused portion of the last element in the bitmap needs to be cleared, since we use functions which process only full-size elements and don't really deal with individual bits.
-
由 Peter Krempa 提交于
The function only reduces the size of the bitmap thus we can use the appropriate shrinking function which also does not have any return value. Since virBitmapShrink now does not return any value callers need to be fixed as well.
-
由 Peter Krempa 提交于
The virBitmap code uses VIR_RESIZE_N to do quadratic scaling, which means that along with the number of requested map elements we also need to keep the number of actually allocated elements for the scaling algorithm to work properly. The shrinking code did not fix 'map_alloc' thus virResizeN might actually not expand the bitmap properly after called on a previously shrunk bitmap.
-
由 Peter Krempa 提交于
virBitmap code is thoroughly documented. Add docs for the few functions missing them.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
'max_bit' is misleading as the value is set to the first invalid bit as it's used as the number of bits in the bitmap. Rename it to a more descriptive name.
-
由 Martin Kletzander 提交于
Since one of the things in capabilities (info from resctrl updated with data about caches) can be change on the system by remounting the /sys/fs/resctrl with different options, the capabilities need to be refreshed. There is a better fix in the works, but it's going to be way bigger than this (hence the XXX note there), so for the time being let's workaround this. And in order not to slow down the domain starting, only get the capabilities if there are any cachetunes. Relates-to: https://bugzilla.redhat.com/show_bug.cgi?id=1540780Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Just in case someone re-mounted /sys/fs/resctrl with different mount options (cdp), add a check here. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540780Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Marc Hartmayer 提交于
Add and use qemuProcessEventFree for freeing qemuProcessEvents. This is less error-prone as the compiler can help us make sure that for every new enumeration value of qemuProcessEventType the qemuProcessEventFree function has to be adapted. All process*Event functions are *only* called by qemuProcessHandleEvent and this function does the freeing by itself with qemuProcessEventFree. This means that an explicit freeing of processEvent->data is no longer required in each process*Event handler. The effectiveness of this change is also demonstrated by the fact that it fixes a memory leak of the panic info data in qemuProcessHandleGuestPanic. Reported-by: NWang Dong <dongdwdw@linux.vnet.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> 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>
-
由 Marc Hartmayer 提交于
Use the return value of virObjectRef directly. This way, it's easier for another reader to identify the reason why the additional reference is required. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 2月, 2018 20 次提交
-
-
由 John Ferlan 提交于
No sense in calling ServiceToggle for all nservices during ServiceDispose since ServerClose calls ServiceClose which removes the IOCallback that's being toggled via ServiceToggle. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Add the DUMP_COMPLETED check to the capabilities. This is the mechanism used to determine whether the dump-guest-memory command can support the "-detach" option and thus be able to wait on the event and allow for a query of the progress of the dump. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Extract out the parts of qemuDomainGetJobStatsInternal that get the migration stats. We're about to add the ability to get just dump information. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Laine Stump 提交于
commit 77a12987 changed the "virDomainChrSourceDef source" inside virDomainChrDef to "virDomainChrSourceDefPtr source", and started allocating source inside virDomainChrDefNew(), but vboxDumpSerial() was allocating a virDomainChrDef with a simple VIR_ALLOC() (i.e. never calling virDomainChrDefNew()), so source was never initialized, leading to a SEGV any time a serial port was present. The same problem was created in vboxDumpParallel(). This patch changes vboxDumpSerial() and vboxDumpParallel() to use virDomainChrDefNew() instead of VIR_ALLOC(), and changes both of those functions to return an error if virDomainChrDef() (or any other allocation) fails. This resolves: https://bugzilla.redhat.com/1536649
-
由 John Ferlan 提交于
Remove the unnecessary check as since commit id '46a811db' it is not possible to add or alter a filter using the same name, but with a different UUID. NB: It's not required to provide a UUID for a filter by name, but if one is provided, then it must match the existing. If not provided, then one is generated during ParseXML processing. Reviewed-by: NLaine Stump <laine@laine.org> Reviewed-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
VIR_ALLOC will already initialize, so no need to do it again.
-
由 Marc Hartmayer 提交于
Use a switch statement instead of if-else-if statements. Move the command line building of the iothread attribute into the common path as the SCSI controller attributes are already validated. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
-
由 John Ferlan 提交于
Move the SATA controller check from command line building to controller def validation. This includes copying the SATA skip check found in qemuBuildSkipController.
-
由 John Ferlan 提交于
Move the qemuCaps checks over to qemuDomainControllerDefValidatePCI. This requires two test updates in order to set the correct capability bit for an xml2xml test as well as setting up the similar capability for the pseries memlocktest.
-
由 John Ferlan 提交于
Excluding the qemuCaps checks, move the remainder of the checks that validate whether the PCI definition is valid or not into qemuDomainControllerDefValidatePCI.
-
由 John Ferlan 提交于
Similar to the checking the modelName vs. NAME_NONE, let's make the ModelNameTypeToString check more generic too within the checking done in controller validation (with the same ignore certain models. NB: We need to keep the ModelNameTypeToString fetch in command line validation since we use it, but at least we can assume it returns something valid now.
-
由 John Ferlan 提交于
Move the various modelName == NAME_NONE from the command line generation into domain controller validation. Also rather than have multiple cases with the same check, let's make the code more generic, but also note that it was the modelName option that caused the failure. We also have to be sure not to check the PCI models that we don't care about. For the remaining checks in command line building, we can use the field name in the error message to be more specific about what causes the failure.
-
由 John Ferlan 提交于
Shorten up a few characters and reference the pciopts pointer
-
由 Andrea Bolognani 提交于
We format the 'chassis' and 'port' properties on the QEMU command line later on, so we should make sure they've been set. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 John Ferlan 提交于
Move PCI validation checks out of qemu_command into the proper qemu_domain validation helper. Since there's a lot to move, we'll start slow by replicating the pcie-root and pci-root avoidance from qemuBuildSkipController and the first switch found in qemuBuildControllerDevStr.
-
由 John Ferlan 提交于
Move SCSI validation from qemu_command into qemu_domain. Rename/reorder the args in qemuCheckSCSIControllerIOThreads to match the caller as well as fixing up the comments to remove the previously removed qemuCaps arg.
-
由 John Ferlan 提交于
Let's make sure that non SCSI virtio-scsi isn't used for any type other than a virtio-scsi controller.
-
由 John Ferlan 提交于
Modify the SCSI controller switch during command line building to account for all virDomainControllerModelSCSI types rather than using the default label.
-
由 John Ferlan 提交于
Move to qemu_domain during the validation of controller options and rename qemuDomainCheckSCSIControllerModel.
-
由 John Ferlan 提交于
Move the checks that various attributes are not set on any controller other than SCSI controller using virtio-scsi model into the common controller validate checks.
-
- 02 2月, 2018 9 次提交
-
-
由 Martin Kletzander 提交于
Cachetune for unavailable vCPUs should be cleared the same way vcpupin and other things do, so let's add tests for it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Some of the other functions depend on the fact that unused bits and longs are always zero and it's less error-prone to clear it than fix the other functions. It's enough to zero out one piece of the map since we're calling realloc() to get rid of the rest (and updating map_len). Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540817Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Found by coverity. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Daniel P. Berrangé 提交于
The position of various parameters changes depending on the WITH_GNUTLS macro. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Since we annotate the APIs are having non-NULL parameters, we can remove the checks for NULL in the code too. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Validate that the virNetServer(Client) RPC APIs are processing the private data callbacks correctly by passing in non-NULL pointers. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1461214 Since fec8f9c4 we try to use predictable file names for 'memory-backend-file' objects. But that made us provide full path to qemu when hot plugging the object while previously we provided merely a directory. But this makes qemu behave differently. If qemu sees a path terminated with a directory it calls mkstemp() and unlinks the file immediately. But if it sees full path it just calls open(path, O_CREAT ..); and never unlinks the file. Therefore it's up to libvirt to unlink the file and not leave it behind. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
In my first approach in 4b480d10 I overlooked the comment in qemuMigrationRunIncoming stating that during actual migration the qemuMigrationRunIncoming does not wait until the migration is complete but rather offloads that to the Finish phase of migration. This means that during actual migration qemuProcessRefreshState was called prior to qemu actually transferring the full state and thus the queries did not get the correct information. The approach worked only for restore, where we wait for the migration to finish during qemu startup. Fix the issue by calling qemuProcessRefreshState both from qemuProcessStart if there's no incomming migration and from qemuMigrationFinish so that the code actually works as expected.
-
由 Michal Privoznik 提交于
In 2074ef6c and c56cdf25 (and friends) we've added two attributes to virtio NICs: rx_queue_size and tx_queue_size. However, sysadmins might want to set these on per-host basis but don't necessarily have an access to domain XML (e.g. because they are generated by some other app). So let's expose them under qemu.conf (the settings from domain XML still take precedence as they are more specific ones). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 01 2月, 2018 1 次提交
-
-
由 Jie Wang 提交于
Commit id 'bc444666' added a check if the returned data buffer had an error, but failed to adjust the event from VIR_DOMAIN_BLOCK_JOB_COMPLETED to VIR_DOMAIN_BLOCK_JOB_FAILED in order to propagate an error such as "File descriptor in bad state" that may be returned from QEMU when both @offset and @len are set to 0 such as is the case when performing an async block job read on a read only filesystem. Signed-off-by: NJie Wang <wangjie88@huawei.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-