[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/6] virtio-serial: Call .guest_ready when new space
From: |
Andrzej Zaborowski |
Subject: |
[Qemu-devel] [PATCH 4/6] virtio-serial: Call .guest_ready when new space is available in the queue. |
Date: |
Mon, 9 Jan 2012 08:57:54 +0100 |
Without that it's impossible to write a virtio-serial port driver that
sends any buffers bigger than a couple kilobytes, other than by
polling to check when space in the queue becomes available.
Signed-off-by: Andrzej Zaborowski <address@hidden>
---
hw/virtio-serial-bus.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 3a9004a..72bbe78 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -495,6 +495,14 @@ static void handle_output(VirtIODevice *vdev, VirtQueue
*vq)
static void handle_input(VirtIODevice *vdev, VirtQueue *vq)
{
+ VirtIOSerial *vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+ VirtIOSerialPort *port = find_port_by_vq(vser, vq);
+ VirtIOSerialPortInfo *info =
+ port ? DO_UPCAST(VirtIOSerialPortInfo, qdev, port->dev.info) : NULL;
+
+ if (info && info->guest_ready) {
+ info->guest_ready(port);
+ }
}
static uint32_t get_features(VirtIODevice *vdev, uint32_t features)
--
1.7.4.4
- [Qemu-devel] [PATCH 0/6] OpenGL passthrough support once again, Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 1/6] gl: Add an OpenGL offscreen rendering API and backends., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 3/6] gl: OpenGL passthrough implementation., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 4/6] virtio-serial: Call .guest_ready when new space is available in the queue.,
Andrzej Zaborowski <=
- [Qemu-devel] [PATCH 5/6] gl: virtio-serial port driver for OpenGL passthrough., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 2/6] gl: Add mesa OpenGL headers., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 6/6] gl: -enable-gl switch to enable the GL virtio port., Andrzej Zaborowski, 2012/01/09
- Re: [Qemu-devel] [PATCH 0/6] OpenGL passthrough support once again, Alon Levy, 2012/01/11
- [Qemu-devel] [PATCH] (dont commit) virtio-gl-fixes for build on F17, Alon Levy, 2012/01/11