aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-serial.h
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-04-29 14:25:06 +0300
committerAmit Shah <amit.shah@redhat.com>2011-05-27 15:50:55 +0530
commit199646d81522509ac2dba6d28c31e8c7d807bc93 (patch)
tree18d4fc8c481f03ccfebff3c2a3a24647954764de /hw/virtio-serial.h
parentaa29141d84d58171c2d219f0a4b599bd76fb2e37 (diff)
downloadqemu-199646d81522509ac2dba6d28c31e8c7d807bc93.zip
qemu-199646d81522509ac2dba6d28c31e8c7d807bc93.tar.gz
qemu-199646d81522509ac2dba6d28c31e8c7d807bc93.tar.bz2
virtio-serial-bus: use bh for unthrottling
Instead of calling flush_queued_data when unthrottling, schedule a bh. That way we can return immediately to the caller, and the flush uses the same call path as a have_data for callbackee. No migration change is required because bh are called from vm_stop. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'hw/virtio-serial.h')
-rw-r--r--hw/virtio-serial.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h
index 5eb948e..b783ee2 100644
--- a/hw/virtio-serial.h
+++ b/hw/virtio-serial.h
@@ -119,6 +119,11 @@ struct VirtIOSerialPort {
uint32_t iov_idx;
uint64_t iov_offset;
+ /*
+ * When unthrottling we use a bottom-half to call flush_queued_data.
+ */
+ QEMUBH *bh;
+
/* Identify if this is a port that binds with hvc in the guest */
uint8_t is_console;