- 08 3月, 2018 1 次提交
-
-
由 John Ferlan 提交于
If we return -1 on VIR_ALLOC_N failure, we leaked @vms, so goto cleanup instead. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 3月, 2018 1 次提交
-
-
由 Erik Skultety 提交于
Fix this common typo and assign a value rather than implicitly type-casted comparison result. Introduced by commit b6a264e8. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 26 2月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
This partially reverts 82592551. When migrating a domain, qemuMigrationDstPrepareAny() is called which eventually calls qemuProcessLaunch(conn = NULL, flags = VIR_QEMU_PROCESS_START_AUTODESTROY); But the very first thing that qemuProcessLaunch does is check if AUTODESTROY flag is set and @conn is not NULL. Well, it is. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 23 2月, 2018 1 次提交
-
-
由 Jiri Denemark 提交于
When calling virDomainDefCompatibleDevice to check a new device during device update, we need to pass the original device which is going to be updated in addition to the new device. Otherwise, the function can report false conflicts. The new argument is currently ignored by virDomainDefCompatibleDevice, but this will change in the following patch. https://bugzilla.redhat.com/show_bug.cgi?id=1546971Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 22 2月, 2018 3 次提交
-
-
由 Nikolay Shirokovskiy 提交于
This flag is only used for tests. Let's instead overload bind syscall in mocks where it is not done yet. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
Host tcp4/tcp6 ports is a global resource thus we need to make port accounting also global or we have issues described in [1] when port allocator ranges of different instances are overlapped (which is by default for qemu for example). Let's have only one global port allocator object that take care of the entire ports range (0 - 65535) and introduce port range object for clients to specify desired auto allocation band. [1] https://www.redhat.com/archives/libvir-list/2017-December/msg00600.htmlSigned-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements, or cast away enum type in places where we don't wish to cover all cases. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 2月, 2018 8 次提交
-
-
由 Daniel P. Berrangé 提交于
It is very difficult while reading the migration code trying to understand whether a particular function is being called on the src side or the dst side, or either. Putting "Src" or "Dst" in the method names will make this much more obvious. "Any" is used in a few helpers which can be called from both sides. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
QEMU code does not work well with too big numbers on the JSON monitor so our monitor code supports sending only numbers up to LLONG_MAX. Avoid a weird error message by limiting the size of the 'bandwidth' parameter for block copy. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1532542Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Daniel P. Berrangé 提交于
The qemuMigrationPrecreateStorage method needs a connection to access the storage driver. Instead of passing it around, open it at time of use. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
There's a few places in startup code paths which pass around a virConnectPtr which is no longer required. Specifically, the qemuProcessStart() method now only requires a non-NULL connection if autodestroy is requested. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
When setting up graphics, we sometimes need to resolve networks, requiring the caller to pass in a virConnectPtr, except sometimes they pass in NULL. Use virGetConnectNetwork() to acquire the connection to the network driver when it is needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
During domain startup there are many places where we need to acquire secrets. Currently code passes around a virConnectPtr, except in the places where we pass in NULL. So there are a few codepaths where ability to start guests using secrets will fail. Change to acquire a handle to the secret driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Rather than expecting callers to pass a virConnectPtr into the virDomainDiskTranslateSourcePool() method, just acquire a connection to the storage driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
There is a long standing hack to pass a virConnectPtr into the qemuMonitorStartCPUs method, so that when the text monitor prompts for a disk password, we can lookup virSecretPtr objects. This causes us to have to pass a virConnectPtr around through countless methods up the call chain....except some places don't have any virConnectPtr available so have always just passed NULL. We can finally fix this disastrous design by using virGetConnectSecret() to open a connection to the secret driver at time of use. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 2月, 2018 1 次提交
-
-
由 Chen Hanxiao 提交于
We forgot to free alloced mem when failed to dup ifname or macaddr. Also use VIR_STEAL_PTR to simplify codes. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 2月, 2018 3 次提交
-
-
由 Daniel P. Berrangé 提交于
The virStorageTranslateDiskSourcePool method modifies a virDomainDiskDef to resolve any storage pool reference. For some reason this was added into the storage driver code, despite working entirely in terms of the public APIs. Move it into the domain conf file and rename it to match the object it modifies. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Currently the QEMU driver will call directly into the network driver impl to modify network device bandwidth for interfaces with type=network. This introduces a callback system to allow us to decouple the QEMU driver from the network driver. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The QEMU driver loadable module needs to be able to resolve all ELF symbols it references against libvirt.so. Some of its symbols can only be resolved against the storage_driver.so loadable module which creates a hard dependancy between them. By moving the storage file backend framework into the util directory, this gets included directly in the libvirt.so library. The actual backend implementations are still done as loadable modules, so this doesn't re-add deps on gluster libraries. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 2月, 2018 3 次提交
-
-
由 Peter Krempa 提交于
Since it may be possible that the state is unknown in some cases we should store it as a tristate so that other code using it can determine whether the state was updated.
-
由 Peter Krempa 提交于
The halted state is no longer extracted using this helper so the argument can be removed.
-
由 Peter Krempa 提交于
Don't extract the halted state into a separate array, but rater access the vcpu structures directly. We still need to call the vcpu helper to retrieve the performance statistics though.
-
- 06 2月, 2018 7 次提交
-
-
由 John Ferlan 提交于
Fix for a CI build failure
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=916061 If the QEMU version running is new enough (based on the DUMP_COMPLETED event), then we can add a 'detach' boolean to the dump-guest-memory command in order to tell QEMU to run in a thread. This ensures that we don't lock out other commands while the potentially long running dump memory is completed. This allows the usage of a qemuDumpWaitForCompletion which will wait for the event while the qemuDomainGetJobInfoDumpStats can be used via qemuDomainGetJobInfo in order to query QEMU to determine how far along the job is. Now that we have a true async job, we'll only set the dump_memory_only flag only when @detach=false; otherwise, we note that the job is a for stats dump this allows the opposite end for job info to determine what to copy. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Add a @detach parameter to the API in order allow running the QEMU code as a thread. Reviewed-by: Jiri Denemark <jdenemar redhat com>
-
由 John Ferlan 提交于
Add an API to allow fetching the memory only dump statistics for a job via the qemuDomainGetJobInfo API. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Define the qemuMonitorDumpStats as a new job JobStatsType to handle being able to get memory dump statistics. For now do nothing with the new TYPE_MEMDUMP. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Add a TYPE_SAVEDUMP so that when coalescing stats for a save or dump we don't needlessly try to get the mirror stats for a migration. Other conditions can still use MIGRATION and SAVEDUMP interchangably including usage of the @migStats field to fetch/store the data. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Convert the stats field in _qemuDomainJobInfo to be a union. This will allow for the collection of various different types of stats in the same field. When starting the async job that will end up being used for stats, set the @statsType value appropriately. The @mirrorStats are special and are used with stats.mig in order to generate the returned job stats for a migration. Using the NONE should avoid the possibility that some random async job would try to return stats for migration even though a migration is not in progress. For now a migration and a save job will use the same statsType Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 05 2月, 2018 1 次提交
-
-
由 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>
-
- 03 2月, 2018 1 次提交
-
-
由 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>
-
- 01 2月, 2018 1 次提交
-
-
由 Chen Hanxiao 提交于
Use the DEVICE_MISSING error code when helpers fail to find the requested device. This makes it easier for consumers to key off the error code rather than the error message. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 30 1月, 2018 1 次提交
-
-
由 John Ferlan 提交于
After processing the processEvent->data for a qemuProcessEventHandler callout, it's expected that the called processEvent->eventType helper will perform the proper free on the data field. In this case it's a qemuMonitorEventPanicInfoPtr.
-
- 09 1月, 2018 1 次提交
-
-
由 Chen Hanxiao 提交于
Commit id '162efa1a' added support hotplug a redirdev, but did not add the hot unplug. This patch will add that support to allow usage of the detach-device --live on the device. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
-
- 05 1月, 2018 1 次提交
-
-
由 John Ferlan 提交于
Alter the function definition to follow more recent style
-
- 04 1月, 2018 1 次提交
-
-
由 Paolo Bonzini 提交于
A microcode update can cause the CPUID bits to change; an example from the past was the update that disabled TSX on several Haswell and Broadwell machines. Therefore, place microcode version in the virQEMUCaps struct and XML, and rebuild the cache if the versions do not match. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 11 12月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1522706 If domain is active, but the undefine API was called without the VIR_DOMAIN_UNDEFINE_KEEP_NVRAM flag set, the following incorrect error message is produced: error: Requested operation is not valid: cannot delete inactive domain with nvram Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 12月, 2017 2 次提交
-
-
由 Ján Tomko 提交于
The underlying function which needs the driver gets it from the passed virDomainObj object anyway.
-
由 Nikolay Shirokovskiy 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 01 12月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
==899== 39 bytes in 1 blocks are definitely lost in loss record 732 of 1,003 ==899== at 0x4C2AEDF: malloc (vg_replace_malloc.c:299) ==899== by 0x8B68CE7: vasprintf (in /lib64/libc-2.25.so) ==899== by 0x55498D2: virVasprintfInternal (virstring.c:708) ==899== by 0x55499E7: virAsprintfInternal (virstring.c:729) ==899== by 0x2BECFFF0: qemuGetMemoryBackingBasePath (qemu_conf.c:1757) ==899== by 0x2BF23225: qemuStateInitialize (qemu_driver.c:893) ==899== by 0x563073D: virStateInitialize (libvirt.c:770) ==899== by 0x124CC4: daemonRunStateInit (libvirtd.c:834) ==899== by 0x55521CD: virThreadHelper (virthread.c:206) ==899== by 0x88D9686: start_thread (in /lib64/libpthread-2.25.so) ==899== by 0x8BEAEFE: clone (in /lib64/libc-2.25.so) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-