- 05 2月, 2013 3 次提交
-
-
由 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 compression binary prints something to stderr, currently it is discarded. However, it can contain useful data from debugging POV, so we should catch it.
-
由 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.
-
- 01 2月, 2013 2 次提交
-
-
由 Stefan Berger 提交于
Add support for QEMU -add-fd command line parameter detection. This intentionally rejects qemu 1.2, where 'add-fd' QMP did not allow full control of set ids, and where there was no command line counterpart, but accepts qemu 1.3. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Add entry points for calling the qemu 'add-fd' and 'remove-fd' monitor commands. There is no entry point for 'query-fdsets'; the assumption is that a developer can use virsh qemu-monitor-command domain '{"execute":"query-fdsets"}' when debugging issues, and that meanwhile, libvirt is responsible enough to remember what fds it associated with what fdsets. Likewise, on the 'add-fd' command, it is assumed that libvirt will always pass a set id, rather than letting qemu autogenerate the next available id number. * src/qemu/qemu_monitor.c (qemuMonitorAddFd, qemuMonitorRemoveFd): New functions. * src/qemu/qemu_monitor.h (qemuMonitorAddFd, qemuMonitorRemoveFd): New prototypes. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONAddFd) (qemuMonitorJSONRemoveFd): New functions. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONAddFd) (qemuMonitorJSONRemoveFd): New prototypes.
-
- 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.
-
- 27 1月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=892289 It seems like with new udev within guest OS, the tray is locked, so we need to: - 'eject' - wait for tray to open - 'change' Moreover, even when doing bare 'eject', we should check for 'tray_open' as guest may have locked the tray. However, the waiting phase shouldn't be unbounded, so I've chosen 10 retries maximum, each per 500ms. This should give enough time for guest to eject a media and open the tray.
-
- 25 1月, 2013 8 次提交
-
-
由 Michal Privoznik 提交于
With our code, we fail to query for tray-open attribute currently. That's because in HMP it is 'tray-open' and in QMP it's 'tray_open'. It always has been. However, we got it exactly the opposite.
-
由 Daniel P. Berrange 提交于
A logic bug meant we reported KVM was possible for every architecture, merely based on whether the query-kvm command exists. We should instead have been doing it based on whether the query-kvm command returns 'present: 1' Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 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>
-
由 Daniel P. Berrange 提交于
This previous commit commit 1a50ba2c Author: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> Date: Mon Nov 26 15:17:13 2012 +0100 qemu: Fix QMP Capabability Probing Failure which attempted to make sure the QEMU process used for probing ran as the right user id, caused serious performance regression and unreliability in probing. The -daemonize switch in QEMU guarantees that the monitor socket is present before the parent process exits. This means libvirtd is guaranteed to be able to connect immediately. By switching from -daemonize to the virCommandDaemonize API libvirtd was no longer synchronized with QEMU's startup process. The result was that the QEMU monitor failed to open and went into its 200ms sleep loop. This happened for all 25 binaries resulting in 5 seconds worth of sleeping at libvirtd startup. In addition sometimes when libvirt connected, QEMU would be partially initialized and crash causing total failure to probe that binary. This commit reverts the previous change, ensuring we do use the -daemonize flag to QEMU. Startup delay is cut from 7 seconds to 2 seconds on my machine, which is on a par with what it was prior to the capabilities rewrite. To deal with the fact that QEMU needs to be able to create the pidfile, we switch pidfile location fron runDir to libDir, which QEMU is guaranteed to be able to write to. 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.
-
由 Josh Durgin 提交于
Hosts for rbd are ceph monitor daemons. These have fixed IP addresses, so they are often referenced by IP rather than hostname for convenience, or to avoid relying on DNS. Using IPv4 addresses as the host name works already, but IPv6 addresses require rbd-specific escaping because the colon is used as an option separator in the string passed to qemu. Escape these colons, and enclose the IPv6 address in square brackets so it is distinguished from the port, which is currently mandatory. Acked-by: NOsier Yang <jyang@redhat.com> Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
-
由 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 5 次提交
-
-
由 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>
-
由 Daniel P. Berrange 提交于
The autodestroy callback code has the following function called from a hash iterator qemuDriverCloseCallbackRun(void *payload, const void *name, void *opaque) { ... char *uuidstr = name ... dom = closeDef->cb(data->driver, dom, data->conn); if (dom) virObjectUnlock(dom); virHashRemoveEntry(data->driver->closeCallbacks, uuidstr); } The closeDef->cb function may well cause the current callback to be removed, if it shuts down 'dom'. As such the use of 'uuidstr' in virHashRemoveEntry is accessing free'd memory. We must make a copy of the uuid str before invoking the callback to be safe. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
This will allow storing additional topology data in the NUMA topology definition. This patch changes the storage type and fixes fallout of the change across the drivers using it. This patch also changes semantics of adding new NUMA cell information. Until now the data were re-allocated and copied to the topology definition. This patch changes the addition function to steal the pointer to a pre-allocated structure to simplify the code.
-
由 Viktor Mihajlovski 提交于
The way in that memory balloon suppression was handled for S390 is flawed for a number or reasons. 1. Just preventing the default balloon to be created in the case of VIR_ARCH_S390[X] is not sufficient. An explicit memballoon element in the guest definition will still be honored, resulting both in a -balloon option and the allocation of a PCI bus address, neither being supported. 2. Prohibiting balloon for S390 altogether at a domain_conf level is no good solution either as there's work in progress on the QEMU side to implement a virtio-balloon device, although in conjunction with a new machine type. Suppressing the balloon should therefore be done at the QEMU driver level depending on the present capabilities. Therefore we remove the conditional suppression of the default balloon in domain_conf.c. Further, we are claiming the memballoon device for virtio-s390 during device address assignment to prevent it from being considered as a PCI device. Finally, we suppress the generation of the balloon command line option if this is a virtio-s390 machine. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@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>
-
- 23 1月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=892079 One of my previous patches (f2a4e5f1) tried to fix crashing libvirtd on domain detroy. However, we need to copy pattern from qemuProcessHandleMonitorEOF() instead of decrementing reference counter. The rationale for this is, if qemu process is dying due to domain being destroyed, we obtain EOF on both the monitor and agent sockets. However, if the exit is expected, qemuProcessStop is called, which cleans both agent and monitor sockets up. We want qemuAgentClose() to be called iff the EOF is not expected, so we don't leak an FD and memory. Moreover, there could be race with qemuProcessHandleMonitorEOF() which could have already closed the agent socket, in which case we don't want to do anything.
-
由 Alon Levy 提交于
Adds a "ram" attribute globally to the video.model element, that changes the resulting qemu command line only if video.type == "qxl". <video> <model type='qxl' ram='65536' vram='65536' heads='1'/> </video> That attribute gets a default value of 64*1024. The schema is unchanged for other video element types. The resulting qemu command line change is the addition of -global qxl-vga.ram_size=<ram>*1024 or -global qxl.ram_size=<ram>*1024 For the main and secondary qxl devices respectively. The default for the qxl ram bar is 64*1024 kilobytes (the same as the default qxl vram bar size).
-
- 22 1月, 2013 2 次提交
-
-
由 John Ferlan 提交于
This avoids "Event negative_returns: A negative constant "-1" is passed as an argument to a parameter that cannot be negative.". The called function uses -1 to determine whether it needs to traverse all the hostdevs.
-
由 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.
-
- 19 1月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
We are already logging other arguments passed, however, @flags were missing there.
-
- 18 1月, 2013 4 次提交
-
-
由 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 提交于
-
由 John Ferlan 提交于
-
由 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>
-
- 17 1月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
The QEMU driver default max port is 65535, but it then increments this by 1 to 65536. This maps to 0 in an unsigned short :-( This was apparently done so that for() loops could use "< max" instead of "<= max". Remove this insanity and just make the loop do the right thing.
-
由 Ján Tomko 提交于
In commit c4bbaaf8, caps->arch was checked uninitialized, rendering the whole check useless. This patch moves the conditional setting of QEMU_CAPS_NO_ACPI to qemuCapsInitQMP, and removes the no longer needed exception for S390. It also clears the flag for all non-x86 archs instead of just S390 in qemuCapsInitHelp.
-
- 16 1月, 2013 4 次提交
-
-
由 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.
-
由 Daniel P. Berrange 提交于
Currently all classes must directly inherit from virObject. This allows for arbitrarily deep hierarchy. There's not much to this aside from chaining up the 'dispose' handlers from each class & providing APIs to check types. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 14 1月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 12 1月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Commit f8d478b6 broke the grouping by five items.
-