- 06 2月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
The QEMU driver struct has a 'qemuVersion' field that was previously used to cache the version lookup from capabilities. With the recent QEMU capabilities rewrite the caching happens at a lower level so this field is pointless. Removing it avoids worries about locking when updating it. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The duplicate VM checking should be done atomically with virDomainObjListAdd, so shoud not be a separate function. Instead just use flags to indicate what kind of checks are required. This pair, used in virDomainCreateXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainRestoreFlags: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, true))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_LIVE | VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainDefineXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 0) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, 0, NULL))) goto cleanup;
-
- 05 2月, 2013 4 次提交
-
-
由 Daniel P. Berrange 提交于
As a step towards making virDomainObjList thread-safe turn it into an opaque virObject, preventing any direct access to its internals. As part of this a new method virDomainObjListForEach is introduced to replace all existing usage of virHashForEach
-
由 Daniel P. Berrange 提交于
The APIs names for accessing the domain list object are very inconsistent. Rename them all to have a standard virDomainObjList prefix.
-
由 Daniel P. Berrange 提交于
Currently the virQEMUDriverPtr struct contains an wide variety of data with varying access needs. Move all the static config data into a dedicated virQEMUDriverConfigPtr object. The only locking requirement is to hold the driver lock, while obtaining an instance of virQEMUDriverConfigPtr. Once a reference is held on the config object, it can be used completely lockless since it is immutable. NB, not all APIs correctly hold the driver lock while getting a reference to the config object in this patch. This is safe for now since the config is never updated on the fly. Later patches will address this fully. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
If a decompression binary prints something to stderr, currently it is discarded. However, it can contain useful data from debugging POV, so we should catch it.
-
- 29 1月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=894723 Currently, if qemuProcessStart() succeeds, but it's decompression binary that returns nonzero status, we don't kill the qemu process, but remove it from internal domain list, leaving the qemu process hanging around totally uncontrolled.
-
- 25 1月, 2013 4 次提交
-
-
由 Daniel P. Berrange 提交于
Currently QEMU capabilities are initialized before the QEMU driver sets ownership on its various directories. The upshot is that if you change the user/group in the qemu.conf file, libvirtd will fail to probe QEMU the first time it is run after the config change. Moving QEMU capabilities initialization to after the chown() calls fixes this Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
Currently, there is no reason to hold qemu driver locked throughout whole API execution. Moreover, we can use the new qemuDomObjFromDomain() internal API to lookup domain then.
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=876829 complains that if a guest is put into S3 state (such as via virsh dompmsuspend) and then an external snapshot is taken, qemu forcefully transitions the domain to paused, but libvirt doesn't reflect that change internally. Thus, a user has to use 'virsh suspend' to get libvirt back in sync with qemu state, and if the user doesn't know this trick, then the guest appears hung. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateActiveExternal): Track fact that qemu wakes up a suspended domain on migration.
-
由 Daniel P. Berrange 提交于
The previous fix to avoid leaking securityDriverNames forgot to handle the case of securityDriverNames being NULL, leading to a crash Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 24 1月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
When shutting down, the QEMU driver forgot to free the securityDriverNames string list Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Viktor Mihajlovski 提交于
Should have been done in commit 56fd5134 already, but was missed due to oversight: qemuDomainSendKey didn't release the driver lock in its cleanup section. This fixes an issue introduced by commit 8c5d2bad. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 22 1月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Forbid the names to match the loading procedure of snapshots.
-
- 21 1月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
The snapshot name is used to create path to the definition save file. When the name contains slashes the creation of the file fails. Reject such names.
-
由 Peter Krempa 提交于
When the snapshot definition can't be saved, the qemuDomainSnapshotCreate function succeeded without filling some of the fields in the internal definition. This patch removes the snapshot and returns failure if the XML file cannot be written.
-
- 18 1月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
When running virDomainDestroy, we need to make sure that no other background thread cleans up the domain while we're doing our work. This can happen if we release the domain object while in the middle of work, because the monitor might detect EOF in this window. For this reason we have a 'beingDestroyed' flag to stop the monitor from doing its normal cleanup. Unfortunately this flag was only being used to protect qemuDomainBeginJob, and not qemuProcessKill This left open a race condition where either libvirtd could crash, or alternatively report bogus error messages about the domain already having been destroyed to the caller Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
-
由 Viktor Mihajlovski 提交于
The driver mutex was unlocked in qemuDomainModifyDeviceFlags before entering qemuDomainObjBeginJobWithDriver where it will be unlocked once more leaving it in an undefined state. The result was that two threads were simultaneously looking up the domain hash table during multiple parallel device attach/detach operations. Luckily this triggered a virHashIterationError. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 16 1月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
Replace the current QEMU driver code for managing port reservations with the new virPortAllocator APIs.
-
由 Daniel P. Berrange 提交于
The virDomainObj, qemuAgent, qemuMonitor, lxcMonitor classes all require a mutex, so can be switched to use virObjectLockable Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
After live change of cpu counts, the number of processor threads is verified. This patch makes use of this approach to check if qemu ignored the request for cpu hot-unplug and report an appropriate message.
-
- 11 1月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Chunyan Liu 提交于
Pass stub driver name directly to pciDettachDevice and pciReAttachDevice to fit for different libvirt drivers. For example, qemu driver prefers pci-stub, but Xen prefers pciback. Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
- 08 1月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The current code is initializing capabilities before setting directory permissions. Thus the QEMU binaries being run may not have the ability to create the UNIX monitor socket on the first run of libvirtd.
-
- 07 1月, 2013 3 次提交
-
-
由 Osier Yang 提交于
This prevents domain starting and disk attaching if the shared disk's setting conflicts with other active domain(s), E.g. A domain with "sgio" set as "filtered", however, another active domain is using it set as "unfiltered".
-
由 Osier Yang 提交于
This ignores the default "filtered" if unpriv_sgio is not supported by kernel, but for explicit request "filtered", it error out for domain starting.
-
由 Osier Yang 提交于
This introduces a hash table for qemu driver, to store the shared disk's info as (@major:minor, @ref_count). @ref_count is the number of domains which shares the disk. Since we only care about if the disk support unprivileged SG_IO commands, and the SG_IO commands only make sense for block disk, this patch only manages (add/remove hash entry) the shared disk for block disk. * src/qemu/qemu_conf.h: (Add member 'sharedDisks' of type virHashTablePtr; Declare helpers qemuGetSharedDiskKey, qemuAddSharedDisk and qemuRemoveSharedDisk) * src/qemu/qemu_conf.c (Implement the 3 helpers) * src/qemu/qemu_process.c (Update 'sharedDisks' when domain starting and shutdown) * src/qemu/qemu_driver.c (Update 'sharedDisks' when attaching or detaching disk).
-
- 05 1月, 2013 6 次提交
-
-
由 Peter Krempa 提交于
A redefinition of an external inactive snapshot/checkpoint wasn't possible without this change.
-
由 Peter Krempa 提交于
When the disk alignment check done while redefining an existing snapshot failed, the qemu driver attempted to free the existing snapshot. As in the cleanup path the definition of the snapshot wasn't assigned, the cleanup code dereferenced a NULL pointer. This patch changes the behavior on error paths while redefining snapshot in two ways: 1) On failure, modifications done on the snapshot definition object are rolled back. 2) The previous definition of the data isn't freed until it's certain it won't be needed any more. This change avoids the segfault and additionally the snapshot doesn't vanish if redefinition fails for some reason.
-
由 Peter Krempa 提交于
-
由 John Eckersberg 提交于
-
由 John Eckersberg 提交于
This also changes the function signature to take a virDomainChrSourceDefPtr instead of just a path, since it needs to differentiate behavior based on source->type.
-
由 John Eckersberg 提交于
The functionality provided in virchrdev.c (previously virconsole.c) is applicable to other types of character devices besides consoles, such as channels. This patch is just code motion, renaming things such as "console" or "pty", instead using more general terms such as "character device" or "device path".
-
- 24 12月, 2012 2 次提交
-
-
由 Michal Privoznik 提交于
Many internal qemu APIs must find domain object from passed virDomainPtr. And with function Peter's introduced, we can use it instead of copying multiple lines among code.
-
由 Michal Privoznik 提交于
There is no need to hold qemu lock during the whole execution of these two APIs.
-
- 22 12月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=888426 The code for doing a block-copy was supposed to track the destination file in drive->mirror, but was set up to do all mallocs prior to starting the copy so that OOM wouldn't leave things partially started. However, the wrong variable was being written; later in the code we silently did 'disk->mirror = mirror' which was still NULL, and thus leaking memory and leaving libvirt to think that the mirror job was never started, which prevented a pivot operation after a copy. Problem introduced in commit 35c7701c. * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Initialize correct variable.
-
- 21 12月, 2012 3 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-