- 06 9月, 2019 3 次提交
-
-
由 Marc-André Lureau 提交于
Add dbusVMStates to keep a list of dbus-vmstate objects needed for migration. They are populated on the command line during start or qemuDBusVMStateAdd/Remove() will hotplug them as needed. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Since libvirt stores the backing chain into the XML in a nested way it is the prime possibility to hit libxml2's parsing limit of 256 layers. Introduce code which will crawl the backing chain and verify that it's not too deep. The maximum nesting is set to 200 layers so that there's still some space left for additional properties or nesting into snapshot XMLs. The check is applied to all disk use cases (starting, hotplug, media change) as well as block copy which changes image and snapshots. We simply report an error and refuse the operation. Without this check a restart of libvirtd would result in the status XML failing to be parsed and thus losing the VM. https://bugzilla.redhat.com/show_bug.cgi?id=1524278Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use VIR_AUTOUNREF and get rid of the cleanup label. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 05 9月, 2019 1 次提交
-
-
由 Jiri Denemark 提交于
When virtlogd is used to capture QEMU's stdout, qemuDomainObjTaint would always fail to write the message to the log file when QEMU is already running (i.e., outside qemuProcessLaunch). This can happen during device hotplug or by sending a custom QEMU guest agent command: warning : qemuDomainObjTaint:8757 : Domain id=9 name='blaf' uuid=9cfa4e37-2930-405b-bcb4-faac1829dad8 is tainted: custom-ga-command error : virLogHandlerDomainOpenLogFile:388 : Cannot open log file: '/var/log/libvirt/qemu/blaf.log': Device or resource busy error : virNetClientProgramDispatchError:172 : Cannot open log file: '/var/log/libvirt/qemu/blaf.log': Device or resource busy The fix is easy, we just need to use the right API for appending a message to QEMU log file instead of creating a new log context. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 03 9月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
A specially crafted XML which would reference a non-existing disk but request the mirror to be registered with the blockjob could potentially make the parser dereference NULL. Fix it by moving the code slightly and just treat it as a wrong job XML. Found by Coverity. Reported-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 29 8月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
In addition to the data that libvirt needs and extracts internally, copy and store the whole 'props' JSON sub-object of the data returned by query-hotpluggable-cpus for future use. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 28 8月, 2019 4 次提交
-
-
由 Boris Fiuczynski 提交于
Add support to specify a boot order on vfio-ccw passthrough devices. Reviewed-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com> Signed-off-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Boris Fiuczynski 提交于
Refactoring the method signatures in preparation for checking boot index of the mediated devices. Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com> Signed-off-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Boris Fiuczynski 提交于
Changing the error messages to report the problem encountered. Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com> Signed-off-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Boris Fiuczynski 提交于
Moving the hostdev boot support validation from the command line generator code into the domain validation code. Reviewed-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com> Signed-off-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 22 8月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Simplify the command line formatter by complicating the validator. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 8月, 2019 6 次提交
-
-
由 Ján Tomko 提交于
Store the namespace URI as const char*, instead of in a function. Suggested-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Now that virDomainXMLNamespace matches virXMLNamespace, we no longer need to keep both around. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Neither the xmlDocPtr nor the root xmlNode (also passed in the XPathContext) are interesting to the callees. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 16 8月, 2019 5 次提交
-
-
由 Peter Krempa 提交于
Implement job handling for the block copy job (drive/blockdev-mirror) when using -blockdev. In contrast to the previously implemented blockjobs the block copy job introduces new images to the running qemu instance, thus requires a bit more handling. When copying to new images the code now makes use of blockdev-create to format the images explicitly rather than depending on automagic qemu behaviour. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
QEMU finally exposes an interface which allows us to instruct it to format or create arbitrary images. This is required for blockdev integration of block copy and snapshots as we need to pre-format images prior to use with blockdev-add. This path introduces job handling and also helpers for formatting and attaching a whole image described by a virStorageSource. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In commit 3f93884a where the job handling of commit jobs with blockdev was added I've forgot to add a 'break' in the switch fomatting the status XML. Thankfully this would not be a problem as the cases where this fell through didn't have any code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The utility of the function is extremely limited as for block copy we need to register the mirror chain earlier than when it's set with the disk. This means that it would be open-coded in that case. Avoid any weird usage and just open-code the only current usage, remove the function, and reword the docs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Rename qemuDomainObjPrivateXMLFormatBlockjobFormatChain to qemuDomainObjPrivateXMLFormatBlockjobFormatSource and add a 'chain' parameter which allows controlling whether the backing chain is formatted. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 12 8月, 2019 1 次提交
-
-
由 Wim ten Have 提交于
QEMU version 2.12.1 introduced a performance feature under commit be7773268d98 ("target-i386: add KVM_HINTS_DEDICATED performance hint") This patch adds a new KVM feature 'hint-dedicated' to set this performance hint for KVM guests. The feature is off by default. To enable this hint and have libvirt add "-cpu host,kvm-hint-dedicated=on" to the QEMU command line, the following XML code needs to be added to the guest's domain description in conjunction with CPU mode='host-passthrough'. <features> <kvm> <hint-dedicated state='on'/> </kvm> </features> ... <cpu mode='host-passthrough ... /> Signed-off-by: NWim ten Have <wim.ten.have@oracle.com> Signed-off-by: NMenno Lageman <menno.lageman@oracle.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 8月, 2019 3 次提交
-
-
由 Maxiwell S. Garcia 提交于
QEMU shows a warning message if partial NUMA mapping is set. This patch adds a warning message in libvirt when editing the XML. It must be an error in future, when QEMU remove this ability. Signed-off-by: NMaxiwell S. Garcia <maxiwell@linux.ibm.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. This patch fixes all paths leading to qemuDomainDefFormatBufInternal. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. This patch fixes all paths leading to qemuDomainDefCopy. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 8月, 2019 2 次提交
-
-
由 Cole Robinson 提交于
The qemu driver already does some <rng> model validation, based on qemuCaps. However, the logic for exposing <rng> model values in domcaps is basically identical. This drops the qemuCaps checking and compares against the domCaps data directly. This approach makes it basically impossible to add a new <rng> model to the qemu driver without extending domcaps. The validation can also be shared with other drivers eventually. Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Fill in virDomainCaps at Validate time and use it to call virDomainCapsDeviceDefValidate Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 06 8月, 2019 2 次提交
-
-
由 Michal Privoznik 提交于
This piece of code will be re-used later. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
I find this function more readable if checks for passed storage source are done first and backing chain is done last. Mixing them together does not hurt, but is less readable. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 29 7月, 2019 5 次提交
-
-
由 Eric Blake 提交于
Time to actually issue the QMP transactions that create and delete persistent checkpoints, resolving TODOs intentionally left earlier in the series. For create, we only need one transaction: inside, we visit all disks affected by the checkpoint, and create a new enabled bitmap, as well as disabling the bitmap of the first ancestor checkpoint (if any) that also had a bitmap. For deletion, we need multiple QMP calls: for each disk, if there is an ancestor checkpoint with a bitmap, then the bitmap must be merged (including activating the ancestor bitmap if the leaf node changes), all before deleting the bitmap from the checkpoint being removed. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Qemu bitmap operations require knowing the node name associated with the format layer (the qcow2 file); as upcoming patches will be grabbing that information frequently, make a helper function to access it. Another potential benefit of this function is that we have a single place where we could insert a QMP node-name scraping call if we don't currently know the node name, when -blockdev is not supported; however, the goal is that we hopefully don't ever have to do that because we instead scrape node names only at the point where they change. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Eric Blake 提交于
A lot of this work heavily copies from the existing snapshot APIs. What's more, this patch is (intentionally) very similar to the checkpoint code just added in the test driver, to the point that qemu checkpoints are not fully usable in this patch, but it at least bisects and builds cleanly. The separation between patches is done because the grunt work of saving and restoring XML and tracking relations between checkpoints is common to the test driver, while the later patch adding integration with QMP is specific to qemu. Also note that the interlocking to prevent checkpoints and snapshots from existing at the same time will be a separate patch, to make it easier to revert that restriction when we finally round out the design for supporting interaction between the two concepts. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Introduce the handler for finalizing a block commit and active bloc commit job which will allow to use it with blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce the handler for finalizing a block pull job which will allow to use it with blockdev. This patch also contains some additional machinery which is required to store all the relevant job data in the status XML which will also be reused with other block job types. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 25 7月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
The <mirror> subelement is used in two ways: in a commit job to point to existing storage, and in a block-copy job to point to additional storage. We need a way to track only the distinct storage. This patch introduces qemuBlockJobDiskRegisterMirror which registers the mirror chain separately only for jobs which require it. This also comes with remembering that in the status XML. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
- 18 7月, 2019 4 次提交
-
-
由 Peter Krempa 提交于
The PR manager is a property of the format layer in qemu so we need to be able to track it also in the chains of orphaned block jobs. Add a helper for qemu to look also into the blockjob state. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When the guest unplugs the disk frontend libvirt is responsible for deleting the backend. Since a blockjob may still have a reference to the backing chain when it is running we'll have to store the metadata for the unplugged disk for future reference. This patch adds 'chain' and 'mirrorChain' fields to 'qemuBlockJobData' to keep them around with the job along with status XML machinery and tests. Later patches will then add code to change the ownership of the chain when unplugging the disk backend. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add support for handling the event either synchronously or asynchronously using the event thread. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Now that block job data is stored in the status XML portion we need to make sure that everything which changes the state also saves the status XML. The job registering function is used while parsing the status XML so in that case we need to skip the XML saving. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-