qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] Enable passing pre-opened chardev socket FDs
@ 2017-12-21 15:59 Daniel P. Berrange
  2017-12-21 15:59 ` [Qemu-devel] [PATCH v2 1/2] io: move fd_is_socket() into common sockets code Daniel P. Berrange
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Daniel P. Berrange @ 2017-12-21 15:59 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Marc-André Lureau, Dr. David Alan Gilbert,
	Markus Armbruster, Eric Blake, Daniel P. Berrange

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.

Changed in v2:

  - Drop 'fdset' property / address kind, and use 'fd' for both CLI and HMP
  - Add unit tests

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  |  32 +++++++--
 chardev/char.c         |   3 +
 include/qemu/sockets.h |   1 +
 io/channel-util.c      |  13 ----
 tests/test-char.c      | 173 ++++++++++++++++++++++++++++++++++++++++++++++++-
 util/qemu-sockets.c    |  55 +++++++++++++++-
 6 files changed, 252 insertions(+), 25 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-12-22 13:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 15:59 [Qemu-devel] [PATCH v2 0/2] Enable passing pre-opened chardev socket FDs Daniel P. Berrange
2017-12-21 15:59 ` [Qemu-devel] [PATCH v2 1/2] io: move fd_is_socket() into common sockets code Daniel P. Berrange
2017-12-21 18:47   ` Eric Blake
2017-12-22  8:55     ` Markus Armbruster
2017-12-22 10:57       ` Daniel P. Berrange
2017-12-21 15:59 ` [Qemu-devel] [PATCH v2 2/2] char: allow passing pre-opened socket file descriptor at startup Daniel P. Berrange
2017-12-21 18:56   ` Eric Blake
2017-12-22 10:06   ` Markus Armbruster
2017-12-22 10:26     ` Daniel P. Berrange
2017-12-22 13:21       ` Markus Armbruster
2017-12-21 16:17 ` [Qemu-devel] [PATCH v2 0/2] Enable passing pre-opened chardev socket FDs no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).