[Qemu-devel] [PATCH v1 0/2] Enable passing pre-opened chardev socket FDs

Daniel P. Berrange posted 2 patches 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171221132717.30284-1-berrange@redhat.com
Test checkpatch passed
Test docker passed
Test ppc passed
Test s390x passed
There is a newer version of this series
chardev/char-socket.c  | 66 ++++++++++++++++++++++++++++++++++++++++++++------
chardev/char.c         |  6 +++++
include/qemu/sockets.h |  1 +
io/channel-util.c      | 13 ----------
monitor.c              |  5 ++++
qapi/common.json       | 11 +++++++++
qapi/sockets.json      | 14 ++++++++---
util/qemu-sockets.c    | 49 +++++++++++++++++++++++++++++++++++++
8 files changed, 142 insertions(+), 23 deletions(-)
[Qemu-devel] [PATCH v1 0/2] Enable passing pre-opened chardev socket FDs
Posted by Daniel P. Berrange 6 years, 3 months ago
This fixes a long standing problem that libvirt has with starting up QEMU.

We have to busy-wait retrying connect() on the QMP monitor socket until QEMU
finally creates & listens on it, but at same time must be careful to not wait
forever if QEMU exits.

This this patch series, libvirt can simply pass in a pre-opened UNIX domain
socket file descriptor, which it can immediately connect to with no busy-wait.

Daniel P. Berrange (2):
  io: move fd_is_socket() into common sockets code
  char: allow passing pre-opened socket file descriptor at startup

 chardev/char-socket.c  | 66 ++++++++++++++++++++++++++++++++++++++++++++------
 chardev/char.c         |  6 +++++
 include/qemu/sockets.h |  1 +
 io/channel-util.c      | 13 ----------
 monitor.c              |  5 ++++
 qapi/common.json       | 11 +++++++++
 qapi/sockets.json      | 14 ++++++++---
 util/qemu-sockets.c    | 49 +++++++++++++++++++++++++++++++++++++
 8 files changed, 142 insertions(+), 23 deletions(-)

-- 
2.14.3