Skip to content

chardev: support non-default gcontext

Peter Xu qemu-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 3 repliesIn review
  2. v14 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4chardev: new qemu_chr_be_update_read_handlers()chardev/char-fe.c chardev/char.c include/chardev/char.h+22 -50 replies
2/4chardev: add Chardev.gcontext fieldchardev/char.c include/chardev/char.h+2 -00 replies
3/4chardev: use per-dev context for io_add_watch_pollchardev/char-fd.c chardev/char-pty.c chardev/char-socket.c +1 more+5 -52 replies
4/4chardev: remove context in chr_update_read_handlerchardev/char-fd.c chardev/char-pty.c chardev/char-socket.c +3 more+6 -100 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarc-André Lureau
SeriesR-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/4] chardev: support non-default gcontext

The old chardev may not fully support non-default GMainContext. One direct clue is that when we call io_add_watch_poll() sometimes we are still passing in the NULL context pointer.

IIUC we are fine during setup since the context will be passed correctly during setup via chr_update_read_handler(). However it won't survive if chardev reconnected due to some reason.

This series tries to solve above problem by caching the gcontext pointer in Chardev itself.

This will be required for the monitor OOB (out-of-band) support, since in that series monitor backends may be run in non-default contexts.

Please review. Thanks.

Peter Xu (4):
chardev: new qemu_chr_be_update_read_handlers()
chardev: add Chardev.gcontext field
chardev: use per-dev context for io_add_watch_poll
chardev: remove context in chr_update_read_handler

 chardev/char-fd.c      |  5 ++---
 chardev/char-fe.c      |  7 ++-----
 chardev/char-pty.c     |  5 ++---
 chardev/char-socket.c  |  7 +++----
 chardev/char-udp.c     |  5 ++---
 chardev/char.c         | 11 +++++++++++
 include/chardev/char.h | 13 ++++++++++++-
 7 files changed, 34 insertions(+), 19 deletions(-)
Signature · 1 line
2.7.4