From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
peterx@redhat.com
Subject: [Qemu-devel] [PATCH v2 0/4] chardev: support non-default gcontext
Date: Thu, 21 Sep 2017 14:35:50 +0800 [thread overview]
Message-ID: <1505975754-21555-1-git-send-email-peterx@redhat.com> (raw)
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(-)
--
2.7.4
next reply other threads:[~2017-09-21 6:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 6:35 Peter Xu [this message]
2017-09-21 6:35 ` [Qemu-devel] [PATCH v2 1/4] chardev: new qemu_chr_be_update_read_handlers() Peter Xu
2017-09-21 6:35 ` [Qemu-devel] [PATCH v2 2/4] chardev: add Chardev.gcontext field Peter Xu
2017-09-21 6:35 ` [Qemu-devel] [PATCH v2 3/4] chardev: use per-dev context for io_add_watch_poll Peter Xu
2017-09-21 14:11 ` Paolo Bonzini
2017-09-22 9:18 ` Peter Xu
2017-09-21 6:35 ` [Qemu-devel] [PATCH v2 4/4] chardev: remove context in chr_update_read_handler Peter Xu
2017-09-21 12:05 ` [Qemu-devel] [PATCH v2 0/4] chardev: support non-default gcontext Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1505975754-21555-1-git-send-email-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).