qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] chardev: postpone connect
@ 2025-10-13 13:38 Vladimir Sementsov-Ogievskiy
  2025-10-13 13:38 ` [PATCH v2 1/7] chardev/char-socket: simplify reconnect-ms handling Vladimir Sementsov-Ogievskiy
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2025-10-13 13:38 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: pbonzini, berrange, eduardo, qemu-devel, vsementsov, raphael,
	armbru, yc-core, d-tatianin

Hi all!

That's a preparation for backend-transfer migration of
vhost-user-blk. For such migration we are going to transfer
vhost-user-blk fds, including backend chardev fd to the target
in migration stream (backed by UNIX domain socket).

So, on the target, we want to know, should we call connect(),
or is it a backend-transfer migration, and we should wait for
incoming fd.

But at initialization time we can't know it: user may setup
migration parameters (enabling backend-transfer) later.

So, let's postpone chardev open/connect phase up to attaching
to frontend. At this point we can check:

- if it's vhost-user-blk, do nothing, let vhost-user-blk decide
  when to do connect()
- otherwise, do connect() at this point

These are new patches, but called v2, as that's a rework of
previous try to handle vhost-user-blk chardev in

  [PATCH 00/33] vhost-user-blk: live-backend local migration

That previous try required additional option for chardevs,
so users should mark chardevs on target by a new option to
enable backend-transfer (and addition option on source was
needed, and addition migration capability).
The new upcoming design will require only one migration
parameter to enable the whole feature. But it requires more
complex logic, to postpone opens/connects, realized for
chardevs in these series.

The series is based on
  [PATCH 0/2] remove deprecated 'reconnect' options
Based-on: <20250924133309.334631-1-vsementsov@yandex-team.ru>

Vladimir Sementsov-Ogievskiy (7):
  chardev/char-socket: simplify reconnect-ms handling
  chardev/char: split chardev_init_logfd() out of qemu_char_open()
  chardev/char: qemu_char_open(): add return value
  chardev/char: move filename and be_opened handling to qemu_char_open()
  chardev/char: introduce .init() + .connect() initialization interface
  chardev/char-socket: move to .init + .connect api
  char: vhost-user-blk call connect by hand

 chardev/char-fe.c                |  19 ++++-
 chardev/char-socket.c            |  64 +++++++++--------
 chardev/char.c                   | 117 +++++++++++++++++++++++--------
 hw/core/qdev-properties-system.c |   2 +-
 include/chardev/char-fe.h        |   2 +
 include/chardev/char-socket.h    |   1 +
 include/chardev/char.h           |  22 +++++-
 tests/unit/test-char.c           |  14 ++--
 ui/dbus-chardev.c                |  12 +++-
 9 files changed, 181 insertions(+), 72 deletions(-)

-- 
2.48.1



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

end of thread, other threads:[~2025-10-14 14:43 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 13:38 [PATCH v2 0/7] chardev: postpone connect Vladimir Sementsov-Ogievskiy
2025-10-13 13:38 ` [PATCH v2 1/7] chardev/char-socket: simplify reconnect-ms handling Vladimir Sementsov-Ogievskiy
2025-10-14  7:31   ` Marc-André Lureau
2025-10-13 13:38 ` [PATCH v2 2/7] chardev/char: split chardev_init_logfd() out of qemu_char_open() Vladimir Sementsov-Ogievskiy
2025-10-14  7:30   ` Marc-André Lureau
2025-10-14  9:21     ` Vladimir Sementsov-Ogievskiy
2025-10-14 13:55       ` Marc-André Lureau
2025-10-13 13:38 ` [PATCH v2 3/7] chardev/char: qemu_char_open(): add return value Vladimir Sementsov-Ogievskiy
2025-10-14  7:10   ` Marc-André Lureau
2025-10-14  9:13     ` Vladimir Sementsov-Ogievskiy
2025-10-13 13:38 ` [PATCH v2 4/7] chardev/char: move filename and be_opened handling to qemu_char_open() Vladimir Sementsov-Ogievskiy
2025-10-14  7:31   ` Marc-André Lureau
2025-10-13 13:38 ` [PATCH v2 5/7] chardev/char: introduce .init() + .connect() initialization interface Vladimir Sementsov-Ogievskiy
2025-10-14  7:30   ` Marc-André Lureau
2025-10-13 13:38 ` [PATCH v2 6/7] chardev/char-socket: move to .init + .connect api Vladimir Sementsov-Ogievskiy
2025-10-14  7:31   ` Marc-André Lureau
2025-10-13 13:38 ` [PATCH v2 7/7] char: vhost-user-blk call connect by hand Vladimir Sementsov-Ogievskiy
2025-10-14  7:30   ` Marc-André Lureau
2025-10-14  9:18     ` Vladimir Sementsov-Ogievskiy
2025-10-14 13:40 ` [PATCH v2 0/7] chardev: postpone connect Daniel P. Berrangé
2025-10-14 14:43   ` Vladimir Sementsov-Ogievskiy

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).