From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Amit Shah" <amit.shah@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@gmail.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PULL 1/4] virtio-console: notify chardev when writable
Date: Fri, 29 May 2015 10:26:15 +0200 [thread overview]
Message-ID: <1432887978-7411-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1432887978-7411-1-git-send-email-kraxel@redhat.com>
From: Marc-André Lureau <marcandre.lureau@gmail.com>
When the virtio serial is writable, notify the chardev backend
with qemu_chr_accept_input().
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/char/virtio-console.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c
index 752ed2c..2a867cb 100644
--- a/hw/char/virtio-console.c
+++ b/hw/char/virtio-console.c
@@ -95,6 +95,15 @@ static void set_guest_connected(VirtIOSerialPort *port, int guest_connected)
}
}
+static void guest_writable(VirtIOSerialPort *port)
+{
+ VirtConsole *vcon = VIRTIO_CONSOLE(port);
+
+ if (vcon->chr) {
+ qemu_chr_accept_input(vcon->chr);
+ }
+}
+
/* Readiness of the guest to accept data on a port */
static int chr_can_read(void *opaque)
{
@@ -188,6 +197,7 @@ static void virtserialport_class_init(ObjectClass *klass, void *data)
k->unrealize = virtconsole_unrealize;
k->have_data = flush_buf;
k->set_guest_connected = set_guest_connected;
+ k->guest_writable = guest_writable;
dc->props = virtserialport_properties;
}
--
1.8.3.1
next prev parent reply other threads:[~2015-05-29 8:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 8:26 [Qemu-devel] [PULL 0/4] spice patch queue Gerd Hoffmann
2015-05-29 8:26 ` Gerd Hoffmann [this message]
2015-05-29 8:26 ` [Qemu-devel] [PULL 2/4] spice-char: notify the server when chardev is writable Gerd Hoffmann
2015-05-29 8:26 ` [Qemu-devel] [PULL 3/4] spice: don't update mm_time when spice-server is stopped Gerd Hoffmann
2015-05-29 8:26 ` [Qemu-devel] [PULL 4/4] spice: fix spice_chr_add_watch() pre-condition Gerd Hoffmann
2015-05-29 10:22 ` [Qemu-devel] [PULL 0/4] spice patch queue Peter Maydell
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=1432887978-7411-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=amit.shah@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).