mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 23:10:08 +00:00
1dc10a7b28
Change the QEMU monitor file handle watch to poll for both read & write events, as well as EOF. All I/O to/from the QEMU monitor FD is now done in the event callback thread. When the QEMU driver needs to send a command, it puts the data to be sent into a qemuMonitorMessagePtr object instance, queues it for dispatch, and then goes to sleep on a condition variable. The event thread sends all the data, and then waits for the reply to arrive, putting the response / error data back into the qemuMonitorMessagePtr and notifying the condition variable. There is a temporary hack in the disk passphrase callback to avoid acquiring the domain lock. This avoids a deadlock in the command processing, since the domain lock is still held when running monitor commands. The next commit will remove the locking when running commands & thus allow re-introduction of locking the disk passphrase callback * src/qemu/qemu_driver.c: Temporarily don't acquire lock in disk passphrase callback. To be reverted in next commit * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Remove raw I/O functions, and a generic qemuMonitorSend() for invoking a command * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Remove all low level I/O, and use the new qemuMonitorSend() API. Provide a qemuMonitorTextIOProcess() method for detecting command/reply/prompt boundaries in the monitor data stream
8 lines
145 B
Plaintext
8 lines
145 B
Plaintext
^src/libvirt\.c$
|
|
^src/qemu/qemu_driver\.c$
|
|
^src/qemu/qemu_monitor\.c$
|
|
^src/util/util\.c$
|
|
^src/xen/xend_internal\.c$
|
|
^daemon/libvirtd.c$
|
|
^gnulib/
|