[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 31/31] RFC: vhost: do not update last avail idx o
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v5 31/31] RFC: vhost: do not update last avail idx on get_vring_base() failure |
Date: |
Thu, 21 Jul 2016 12:57:50 +0400 |
From: Marc-André Lureau <address@hidden>
The state.num value will probably be 0 in this case, but I guess that
doesn't make sense to update.
Signed-off-by: Marc-André Lureau <address@hidden>
---
hw/virtio/vhost.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index c9466f1..6175d8b 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -945,8 +945,9 @@ static void vhost_virtqueue_stop(struct vhost_dev *dev,
r = dev->vhost_ops->vhost_get_vring_base(dev, &state);
if (r < 0) {
VHOST_OPS_DEBUG("vhost VQ %d ring restore failed: %d", idx, r);
+ } else {
+ virtio_queue_set_last_avail_idx(vdev, idx, state.num);
}
- virtio_queue_set_last_avail_idx(vdev, idx, state.num);
virtio_queue_invalidate_signalled_used(vdev, idx);
/* In the cross-endian case, we need to reset the vring endianness to
--
2.9.0
- [Qemu-devel] [PATCH v5 21/31] vhost: add assert() to check runtime behaviour, (continued)
- [Qemu-devel] [PATCH v5 21/31] vhost: add assert() to check runtime behaviour, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 22/31] char: add chr_wait_connected callback, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 23/31] char: add and use tcp_chr_wait_connected, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 24/31] vhost-user: wait until backend init is completed, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 25/31] tests: plug some leaks in virtio-net-test, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 26/31] tests: fix vhost-user-test leak, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 27/31] tests: add /vhost-user/connect-fail test, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 28/31] tests: add a simple /vhost-user/multiqueue test, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 29/31] vhost-user: add error report in vhost_user_write(), marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 30/31] vhost: add vhost_net_set_backend(), marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 31/31] RFC: vhost: do not update last avail idx on get_vring_base() failure,
marcandre . lureau <=