- 20 2月, 2019 18 次提交
-
-
由 Jiri Denemark 提交于
Users qemuProcessQMP struct were always forced to call both qemuProcessQMPStop and qemuProcessQMPFree when they are done with the process. We can just call qemuProcessQMPStop from qemuProcessQMPFree and let users call qemuProcessQMPFree only. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
qemuProcessQMPNew is one of the public functions used to create and manage a QEMU process for QMP command exchanges outside of domain operations. Add descriptive comment block, debug statement and make source consistent with the cleanup / VIR_STEAL_PTR format used elsewhere. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
The monitor config data is removed from the qemuProcessQMP struct. The monitor config data can be initialized immediately before call to qemuMonitorOpen and does not need to be maintained after the call because qemuMonitorOpen copies any strings it needs. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
Move code for setting paths and prepping file system from qemuProcessQMPNew to qemuProcessQMPInit. This keeps qemuProcessQMPNew limited to data structures and path initialization is done in qemuProcessQMPInit. The patch is a non-functional, cut / paste change, however goto is now "cleanup" rather than "error". Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
Store libDir path in the qemuProcessQMP struct in anticipation of moving path construction code into qemuProcessQMPInit function. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
All code related to QEMU monitor is moved from qemuProcessQMPNew and qemuProcessQMPInit into qemuProcessQMPConnectMonitor. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
This is a replacement for qemuProcessQMPRun to make the name consistent with qemuProcessStart. The original qemuProcessQMPRun function is renamed as qemuProcessQMPLaunch and becomes one of the simpler functions called from the main qemuProcessQMPStart entry point. The following patches will move parts of the code in qemuProcessQMPLaunch to the other functions (qemuProcessQMPInit and qemuProcessQMPConnectMonitor). Signed-off-by: NChris Venteicher <cventeic@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Keep the pointer to QEMU stderr output in qemuProcessQMP struct instead of requiring the caller to provide it (and free it). Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Let's push the call to virQEMUCapsLogProbeFailure down the stack to where the probing failure is detected. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
While qemuProcessQMPRun and virQEMUCapsInitQMPMonitor* functions called from virQEMUCapsInit ignore some errors, the caller of virQEMUCapsInit would report an error unless usedQMP is true anyway. And since usedQMP can only be true if the probing code really succeeded (i.e., no errors were ignored), we can just simplify the logic by not ignoring the errors in the first place. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The function contains two almost identical parts. Let's consolidate them into a single helper function and call it twice. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
In new process code, move from model where qemuProcessQMP struct can be used to activate a series of Qemu processes to model where one qemuProcessQMP struct is used for one and only one Qemu process. By allowing only one process activation per qemuProcessQMP struct, the struct can safely store process outputs like status and stderr, without being overwritten, until qemuProcessQMPFree is called. By doing this, process outputs like status and stderr can remain stored in the qemuProcessQMP struct without being overwritten by subsequent process activations. The forceTCG parameter (use / don't use KVM) will be passed when the qemuProcessQMP struct is initialized since the qemuProcessQMP struct won't be reused. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
virQEMUCapsInitQMP now stops QEMU process in all execution paths, before freeing the process structure. The qemuProcessQMPStop function can be called multiple times without problems... Won't attempt to stop processes and free resources multiple times. Follow the convention established in qemu_process of 1) alloc process structure 2) start process 3) use process 4) stop process 5) free process data structure The process data structure persists after the process activation fails or the process dies or is killed so stderr strings can be retrieved until the process data structure is freed. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
s/qemuProcessQMPAbort/qemuProcessQMPStop/ applied to change function name used to stop QEMU processes in process code moved from qemu_capabilities. No functionality change. The new name, qemuProcessQMPStop, is consistent with the existing function qemuProcessStop used to stop Domain processes. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
s/cmd/proc/ in process code imported from qemu_capabilities. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
Add the const qualifier on non modified strings (string only copied inside qemuProcessQMPNew) so that const strings can be used directly in calls to qemuProcessQMPNew in future patches. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
s/virQEMUCapsInitQMPCommand/qemuProcessQMP/ Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Chris Venteicher 提交于
QEMU process code in qemu_capabilities.c is moved to qemu_process.c in order to make the code usable outside the original capabilities use cases. The moved code activates and manages QEMU processes without establishing a guest domain. This patch is a straight cut/paste move between files. Signed-off-by: NChris Venteicher <cventeic@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 19 2月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
We dropped support in commit 8e91a400 (November 2015), but some occurrences still remained, even in live code. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reported-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 18 2月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
Now that virStorageSource is a subclass of virObject we can use virObjectUnref and remove virStorageSourceFree which was a thin wrapper. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Since virStorageSource is now a subclass of virObject, we can use VIR_AUTOUNREF instead. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Add virStorageSourceNew and refactor places allocating that structure to use the helper. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 14 2月, 2019 9 次提交
-
-
由 Michal Privoznik 提交于
My change in 112f3a8d was too drastic. The @charAlias variable is initialized only if @monitor == true. However, it is used even outside of that condition, at which point it's just uninitialized pointer. Reported-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Ján Tomko 提交于
Instead of repetitive: s ? s : "" use NULLSTR_EMPTY. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Michal Privoznik 提交于
The @tmpChr is looked up in domain definition based on user provided chardev XML. Therefore, the alias must have been allocated already when domain was started up. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This is basically an old artefact from 24b08219 when the idea was: 1) Build device string only to see if chardev has any -device associated with it and thus if device_del is needed 2) Detach chardev using chardev_del Now, that DEVICE and DEVICE_DELETED capabilities are assumed for every domain 1) does not make sense anymore. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1624204 The guestfwd channels are -netdevs really. Hotunplug them as such. Also, DEVICE_DELETED event is not triggered (surprisingly, since we're not issuing device_del rather than netdev_del) and associated chardev is removed automagically too. This means that we need to do qemuDomainRemoveChrDevice() minus monitor call to remove the chardev. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1624204 The guestfwd channels are -netdevs really. Hotplug them as such. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Introduced by d86c876a. There is no real need to have "user-" prefix for chardev. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
So far we are passing @chr to qemuBuildChrDeviceStr. This is suboptimal (in fact wrong) because @chr is just parsed XML definition provided by user which by definition may lack some information. On the other hand, @tmpChr is the one that was found using @chr in domain definition so it contains the same amount of information or more. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Eric Blake 提交于
The code for creating external snapshots for an offline domain called out to qemu-img without escaping commas in the manner that qemu-img expects. This also fixes a typo in the comment. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 13 2月, 2019 1 次提交
-
-
由 John Ferlan 提交于
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 12 2月, 2019 3 次提交
-
-
由 John Ferlan 提交于
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 John Ferlan 提交于
Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Since commit a7424faf QMP is always used. Also, commit 932534e8 removed the last use of this apart from: * parsing/formatting this in the caps cache * using it as a temporary variable to know when to report an error Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 08 2月, 2019 5 次提交
-
-
由 Andrea Bolognani 提交于
These functions do mostly the same things, and it would be preferrable if they did them in mostly the same ways. This also fixes a few violations to our code style guidelines. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
The function operates on a virDomainDef and is not tied to device address assignment in any way, so it makes more sense for it to live along with qemuDomainIs*() and the like. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Ideally we'd make all of them static, but there are a few cases where we don't have a virDomainDef instance handy and so they are the only option. For the few ones we're forced to keep exporting, document through comments that the alternative is preferred. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Now that we have added architecture checks to all qemuDomainIs*() functions, we no longer need to perform the same checks separately. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
There is very little overlap in the machine types available on different architectures, so broadly speaking checking the machine type is usually enough; regardless, it's better to check the architecture as well. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-