- 07 4月, 2020 7 次提交
-
-
由 Michal Privoznik 提交于
So far, libvirt generates the following path for memory: $memoryBackingDir/$id-$shortName/ram-nodeN where $memoryBackingDir is the path where QEMU mmaps() memory for the guest (e.g. /var/lib/libvirt/qemu/ram), $id is domain ID and $shortName is shortened version of domain name. So for instance, the generated path may look something like this: /var/lib/libvirt/qemu/ram/1-QEMUGuest/ram-node0 While in case of embed driver the following path would be generated by default: $root/lib/qemu/ram/1-QEMUGuest/ram-node0 which is not clashing with other embed drivers, we allow users to override the default and have all embed drivers use the same prefix. This can create clashing paths. Fortunately, we can reuse the approach for machined name generation (v6.1.0-178-gc9bd08ee) and include part of hash of the root in the generated path. Note, the important change is in qemuGetMemoryBackingBasePath(). The rest is needed to pass driver around. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
So far, libvirt generates the following path for hugepages: $mnt/libvirt/qemu/$id-$shortName where $mnt is the mount point of hugetlbfs corresponding to hugepages of desired size (e.g. /dev/hugepages), $id is domain ID and $shortName is shortened version of domain name. So for instance, the generated path may look something like this: /dev/hugepages/libvirt/qemu/1-QEMUGuest But this won't work with embed driver really, because if there are two instances of embed driver, and they both want to start a domain with the same name and with hugepages, both drivers will generate the same path which is not desired. Fortunately, we can reuse the approach for machined name generation (v6.1.0-178-gc9bd08ee) and include part of hash of the root in the generated path. Note, the important change is in qemuGetBaseHugepagePath(). The rest is needed to pass driver around. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 06a19921. What I haven't realized when writing this ^^ commit is that the virQEMUDriver structure already stores the root directory path. And since the pointer is immutable it can be accessed right from the structure and thus there is no need to duplicate it in the driver config. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
The cfg->root is going away, therefore get the info right from the driver structure. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
The virDomainGenerateMachineName() function doesn't belong in src/conf/ really, because it has nothing to do with domain XML parsing. It landed there because of lack of better place in the past. But now that we have src/hypervisor/ the function should live there. At the same time, the function name is changed to match new location. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
Initially introduced in v3.10.0-rc1~172. When generating a path for memory-backend-file or -mem-path, qemu driver will use the following pattern: $memoryBackingDir/libvirt/qemu/$id-$shortName where $memoryBackingDir defaults to /var/lib/libvirt/qemu/ram but can be overridden in qemu.conf. Anyway, the "/libvirt/qemu/" part looks redundant, because it's already contained in the default, or creates unnecessary nesting if overridden in qemu.conf. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Michal Privoznik 提交于
Introduced in v1.2.17-rc1~121, the assumption was that the driver->privileged is immutable at the time but it might change in the future. Well, it did not ever since. It is still immutable variable. Drop the needless accessor then. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 06 4月, 2020 3 次提交
-
-
由 Seeteena Thoufeek 提交于
Signed-off-by: NSeeteena Thoufeek <s1seetee@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Christian Schoenebeck 提交于
This option prevents misbehaviours on guest if a qemu 9pfs export contains multiple devices, due to the potential file ID collisions this otherwise may cause. Signed-off-by: NChristian Schoenebeck <qemu_oss@crudebyte.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Christian Schoenebeck 提交于
The QEMU 9pfs 'multidevs' option exists since QEMU 4.2. Probe QEMU's command line set though to check whether this option is really available, and if yes enable this new QEMU_CAPS_FSDEV_MULTIDEVS capability on libvirt side. Signed-off-by: NChristian Schoenebeck <qemu_oss@crudebyte.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 03 4月, 2020 24 次提交
-
-
由 Daniel Henrique Barboza 提交于
Now that all its helper functions are in qemu_validate.c, we can move the function itself. The helpers can become static again since they're all in the same file. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This will allow to move qemuDomainDeviceDefValidate() itself in the next patch in a cleaner way. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Move the function and all its static helper functions. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This function will remain public due to its usage in qemublocktest.c even after moving qemuDomainDeviceDefValidate(). The position of its header in qemu_validate.h is no accident. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This function alone requires other 3 static functions to be moved as well, thus let's move it in its own patch. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
qemuDomainChrDefValidate() has a lot of static helpers functions that needed to be moved as well. Other functions from qemuDomainDeviceDefValidate() that were also moved: - qemuValidateDomainSmartcardDef - qemuValidateDomainRNGDef - qemuValidateDomainRedirdevDef - qemuValidateDomainWatchdogDef Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
The next big task is to move qemuDomainDeviceDefValidate() to qemu_validation.c, which is a function that calls a lot of other static helper functions. This patch starts it by moving qemuDomainDeviceDefValidateAddress(). Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Move the static functions qemuDomainValidateDef() uses, as well as qemuDomainValidateDef() itself to qemu_validate. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This patch introduces a new file to host domain validations from the QEMU driver. And to get things started, let's move qemuDomainDefValidateFeatures() to this new file. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Seeteena Thoufeek 提交于
This is the only instance of g_autofree change applicable for qemu_checkpoint.c Signed-off-by: NSeeteena Thoufeek <s1seetee@linux.vnet.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
libvirtd supports this feature, and virtqemud ultimately calls to the same code so it does as well: advertise it in the sysconf file for the latter, as is already the case for the former. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
This follows the example set by libvirtd, and makes it easier for the admin to tweak the timeout or disable it altogether. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
While not terribly useful in general, tweaking each daemon's timeout (or disabling it off altogether) is a valid use case which we can very easily support while being consistent with what already happens for libvirtd. This is a first step in that direction. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Skip the liveness and capability checks when redefining checkpoints as we don't need qemu interactions to update the metadata. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Add a comment noting that job update can cause the pointer to be invalid and thus should not be accessed after. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
No callers use it any more. Additionally if qemuBlockJobUpdate was called with the last reference of the job e.g. in qemuBlockJobRefreshJobs, the reading of the job state would happen from freed memory. Reported-by: NPavel Mores <pmores@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Upcoming patch will remove it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
virStorageFileSupportsSecurityDriver ends up initializing the storage file backend which after the recent changes to the daemon architecture may end up dlopening of the backend modules. Since this is required only for remote storage we can optimize the call by moving the check whether the backend is supported to the branch which deals with remote storage. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com>
-
由 Peter Krempa 提交于
Treat the shortcut for chowning local files as a stand-alone section by returning success from it and refactor the rest so that the cleanup section is inline. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com>
-
- 02 4月, 2020 1 次提交
-
-
由 Peter Krempa 提交于
Commit 2ace7a87 introduced a logic bug by an improperly modified condition where we'd skip to the else branch when reusing of external images was requested and blockdev is available. The original intentions were to skip the backing store update with blockdev. Fix it by only asserting the boolean which was used to track whether we support update of the backing store only when blockdev is not present along with the appropriate rename. https://bugzilla.redhat.com/show_bug.cgi?id=1820016Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 01 4月, 2020 2 次提交
-
-
由 Ján Tomko 提交于
When moving the formatting of this attributes from -drive to -device, the QEMU_CAPS_USB_STORAGE_WERROR capability was used, because usb-storage was the last device to gain this capability. However this lead to the assumption that QEMU binaries without the usb-storage device do not support this, leading to breakage on s390x with blockdev. Fixes: bb4f3543 https://bugzilla.redhat.com/show_bug.cgi?id=1819250Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Detect the werror property on SCSI and virtio disks. But clear it if the QEMU supports usb-storage device without it also supporting this option for usb-storage. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 30 3月, 2020 3 次提交
-
-
由 Daniel P. Berrangé 提交于
In previous commit: commit e6afacb0 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Wed Feb 12 12:26:11 2020 +0000 qemu: start/stop an event loop thread for domains A bogus comment was added claiming we didn't need to shutdown the event thread in the qemuProcessStop method, because this would be done in the monitor EOF callback. This was wrong because the EOF callback only runs in the case of a QEMU crash or a guest initiated clean shutdown & poweroff. In the case where the libvirt admin calls virDomainDestroy, the EOF callback never fires because we have already unregistered the event callbacks. We must thus always attempt to stop the event thread in qemuProcessStop. Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reported-by: NPeter Krempa <pkrempa@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
If the storage source has the query part set, format it in the output. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Since we are refreshing the relative paths when doing the blockjobs we no longer need to load them upfront when doing the snapshot. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-