- 04 6月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
When qemu does not support the balloon event the current memory size needs to be queried. Since there are two places that implement the same logic, split it out into a function and reuse.
-
由 Ján Tomko 提交于
-
- 03 6月, 2015 5 次提交
-
-
由 Peter Krempa 提交于
Refactor the function to return the bitmap instead of an integer and the inner workings so that they make more sense. This patch also fixes possible segfault on old systems that was introduced by commit: commit f1a43a8e Author: Hu Tao <hutao@cn.fujitsu.com> Date: Fri Sep 14 15:46:59 2012 +0800 use virBitmap to store cpu affinity info
-
由 Peter Krempa 提交于
Get rid of the unnecessary allocation and copying of the bitmap and clean up some unnecesary temporary variables.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Reuse the function so that we can get rid of a lot of temporary allocations.
-
由 Peter Krempa 提交于
Store the emulator pinning cpu mask as a pure virBitmap rather than the virDomainPinDef since it stores only the bitmap and refactor qemuDomainPinEmulator to do the same operations in a much saner way. As a side effect virDomainEmulatorPinAdd and virDomainEmulatorPinDel can be removed since they don't add any value.
-
- 27 5月, 2015 2 次提交
-
-
由 Andrea Bolognani 提交于
The QMP command, like the interrupt reinjection logic it's connected to, is only implemented in QEMU when TARGET_I386 is defined, so checking for its availability on any other architecture is pointless. On the other hand, when we're on x86, we shouldn still make sure that rtc-reset-reinjection is available and refuse to set the time otherwise. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1211938
-
由 Peter Krempa 提交于
Since commit bcd9a564 virDomainNumatuneGetMode returns the value via a pointer rather than in the return value. The change triggered problems with platforms where the compiler decides to use a data type of size different than integer at the point where we typecast it. Work around the issue by using an intermediate variable of the correct type that gets casted back by the default typecasting rules.
-
- 21 5月, 2015 2 次提交
-
-
由 Ján Tomko 提交于
Base-64 encode the password and pass it to the guest agent via the 'guest-set-user-password' command. https://bugzilla.redhat.com/show_bug.cgi?id=1174177
-
由 Jiri Denemark 提交于
Most virDomainDiskIndexByName callers do not care about the index; what they really want is a disk def pointer. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 20 5月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
So far, we are not reporting if numatune was even defined. The value of zero is blindly returned (which maps onto VIR_DOMAIN_NUMATUNE_MEM_STRICT). Unfortunately, we are making decisions based on this value. Instead, we should not only return the correct value, but report to the caller if the value is valid at all. For better viewing of this patch use '-w'. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=976387 For a domain configured using the host cdrom, we should taint the domain due to problems encountered when the host and guest try to control the tray.
-
- 19 5月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Since af2a1f05, qemuDomainGetNumaParameters() returns invalid value for a running guest. The problem is that it is getting the information from cgroups, but the parent cgroup is being left alone since the mentioned commit. Since the running guest's XML is in sync with cgroups, there is no need to look into cgroups (unless someone changes the configuration behind libvirt's back). Returning the info from the definition fixes a bug and is also a cleanup. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1221047Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 18 5月, 2015 1 次提交
-
-
由 Laine Stump 提交于
For some reason a union (_virNodeDevCapData) that had only been declared inside the toplevel struct virNodeDevCapsDef was being used as an argument to functions all over the place. Since it was only a union, the "type" attribute wasn't necessarily sent with it. While this works, it just seems wrong. This patch creates a toplevel typedef for virNodeDevCapData and virNodeDevCapDataPtr, making it a struct that has the type attribute as a member, along with an anonymous union of everything that used to be in union _virNodeDevCapData. This way we only have to change the following: s/union _virNodeDevCapData */virNodeDevCapDataPtr / and s/caps->type/caps->data.type/ This will make me feel less guilty when adding functions that need a pointer to one of these.
-
- 15 5月, 2015 2 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
And move it to qemu_domain.[ch] because this API is QEMU-only. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 14 5月, 2015 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1218577 Treat pinning an IOThread via API as if someone added an IOThread to ensure the iothreadid doesn't cause the guest to disappear
-
- 13 5月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
Otherwise we might allow coldplugging a device that uses an address that is already occupied, creating an unstartable domain. https://bugzilla.redhat.com/show_bug.cgi?id=1220195
-
- 12 5月, 2015 1 次提交
-
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1220809 When cold-plugging an RNG device but something fails in qemuDomainAssignAddresses, we will double free the RNG device. Once a device is plugged into the domain, we should set the device pointer to NULL to fix this issue. ... 5 0x00007fb7d180ac8a in virFree at util/viralloc.c:582 6 0x00007fb7d1895cdd in virDomainRNGDefFree at conf/domain_conf.c:19786 7 0x00007fb7d1895d99 in virDomainDeviceDefFree at conf/domain_conf.c:2022 8 0x00007fb7b92b8baf in qemuDomainAttachDeviceFlags at qemu/qemu_driver.c:8785 9 0x00007fb7d190c5d7 in virDomainAttachDeviceFlags at libvirt-domain.c:8488 10 0x00007fb7d23af9d2 in remoteDispatchDomainAttachDeviceFlags at remote_dispatch.h:2842 ... Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 11 5月, 2015 3 次提交
-
-
由 Peter Krempa 提交于
Since libvirt doesn't call to update the new balloon size in qemu add code that will handle tweaking of the size of the current balloon statistic until qemu reports the new size using the event.
-
由 Peter Krempa 提交于
Use the new domain list collection helpers to avoid going through virDomainPtrs. This additionally implements filter capability when called through the api that accepts domain list filters.
-
由 Peter Krempa 提交于
Extend it to a universal helper used for clearing lists of any objects. Note that the argument type is specifically void * to allow implicit typecasting. Additionally add a helper that works on non-NULL terminated arrays once we know the length.
-
- 07 5月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=890648 So, imagine you've issued an API that involves guest agent. For instance, you want to query guest's IP addresses. So the API acquires QUERY_JOB, locks the guest agent and issues the agent command. However, for some reason, guest agent replies to initial ping correctly, but then crashes tragically while executing real command (in this case guest-network-get-interfaces). Since initial ping went well, libvirt thinks guest agent is accessible and awaits reply to the real command. But it will never come. What will is a monitor event. Our handler (processSerialChangedEvent) will try to acquire MODIFY_JOB, which will fail obviously because the other thread that's executing the API already holds a job. So the event handler exits early, and the QUERY_JOB is never released nor ended. The way how to solve this is to put flag somewhere in the monitor internals. The flag is called @running and agent commands are issued iff the flag is set. The flag itself is set when we connect to the agent socket. And unset whenever we see DISCONNECT event from the agent. Moreover, we must wake up all the threads waiting for the agent. This is done by signalizing the condition they're waiting on. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Running shutdown with mode agent on a shutoff domain gives cryptic error message: virsh # shutdown --mode agent gentoo error: Failed to shutdown domain gentoo error: Guest agent is not responding: QEMU guest agent is not connected After this patch, the error is more clear: virsh # shutdown --mode agent gentoo error: Failed to shutdown domain gentoo error: Requested operation is not valid: domain is not running Reported-by: NMartin Kletzander <mkletzan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 5月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Coverity points out that qemuMonitorGetAllBlockStatsInfo could return a -1 and thus not fill in 'stats' (leaving it NULL). Then the call to qemuMonitorBlockStatsUpdateCapacity will dereference it.
-
- 04 5月, 2015 3 次提交
-
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1218145 Jump to endjob instead of cleanup to fix this deadlock. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Pavel Hrdina 提交于
Now that we have macros for exclusive flags and flag requirements we can use them to cleanup the code for setvcpus and error out for all wrong flag combination. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 30 4月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
Since the qemu capabilities are not initialized for offline VMs the caller might get suboptimal error message: $ virsh blockjob VM PATH --bandwidth 1 error: unsupported configuration: block jobs not supported with this QEMU binary Move the checks after we make sure that the VM is alive.
-
- 29 4月, 2015 4 次提交
-
-
由 Michael Chapman 提交于
The !modern code path needs to call qemuBlockJobEventProcess directly. the modern code path will call it via qemuBlockJobSyncWait. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
We will want to use synchronous block jobs from qemu_migration as well, so split this function out into a new source file. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Peter Krempa 提交于
While qemu would reject the configuration we can check whether it makes sense to plug the device upfront.
-
由 Peter Krempa 提交于
The documentation states that for shallow block copy the image has to have the same guest visible content as backing file of the current image if the file is being reused. This condition can be achieved also with a raw file (or a qcow without a backing file) so remove the condition that would disallow it. (This patch additionally fixes crash described in https://bugzilla.redhat.com/show_bug.cgi?id=1215569 )
-
- 28 4月, 2015 6 次提交
-
-
由 John Ferlan 提交于
Replace with just VIR_FREE.
-
由 John Ferlan 提交于
Rather than have a separate routine to parse the alias of an iothread returned from qemu in order to get the iothread_id value, parse the alias when returning and just return the iothread_id in qemuMonitorIOThreadInfoPtr This set of patches removes the function, changes the "char *name" to "unsigned int" and handles all the fallout.
-
由 John Ferlan 提交于
Coverity notes that the switch() used to check 'connected' values has two DEADCODE paths (_DEFAULT & _LAST). Since 'connected' is a boolean it can only be one or the other (CONNECTED or DISCONNECTED), so it just seems pointless to use a switch to get "all" values. Convert to if-else
-
由 John Ferlan 提交于
Add qemuDomainAddIOThread and qemuDomainDelIOThread in order to add or remove an IOThread to/from the host either for live or config optoins The implementation for the 'live' option will use the iothreadpids list in order to make decision, while the 'config' option will use the iothreadids list. Additionally, for deletion each may have to adjust the iothreadpin list. IOThreads are implemented by qmp objects, the code makes use of the existing qemuMonitorAddObject or qemuMonitorDelObject APIs. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Remove the iothreadspin array from cputune and replace with a cpumask to be stored in the iothreadids list. Adjust the test output because our printing goes in order of the iothreadids list now.
-
由 John Ferlan 提交于
Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the 'thread_id' as returned from the live qemu monitor data. Remove the iothreadpids list from _qemuDomainObjPrivate and replace with the new iothreadids 'thread_id' element. Rather than use the default numbering scheme of 1..number of iothreads defined for the domain, use the iothreadid's list for the iothread_id Since iothreadids list keeps track of the iothread_id's, these are now used in place of the many places where a for loop would "know" that the ID was "+ 1" from the array element. The new tests ensure usage of the <iothreadid> values for an exact number of iothreads and the usage of a smaller number of <iothreadid> values than iothreads that exist (and usage of the default numbering scheme).
-