[PATCH 6/6] kvm: qemu: virtio-net: drop mutex during tx tapfd write

Mark McLoughlin
2008-10-30T17:53:24Z

This allows the guest vcpu thread to exit while the I/O thread is
churning away.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
qemu/hw/virtio-net.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index 0612f5f..aa1c107 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -252,7 +252,9 @@ static int virtio_net_flush_tx(VirtIONet *n, VirtQueue *vq)
len += sizeof(struct virtio_net_hdr);
}

+ kvm_sleep_begin();
len += qemu_sendv_packet(n->vc, out_sg, out_num);
+ kvm_sleep_end();

virtqueue_push(vq, &elem, len);
virtio_notify(&n->vdev, vq);
--
1.5.4.3