[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 33/33] RFC: vhost: do not update last avail idx o
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v6 33/33] RFC: vhost: do not update last avail idx on get_vring_base() failure |
Date: |
Wed, 27 Jul 2016 01:15:27 +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 b0e8ecc..3d0c807 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 v6 24/33] char: add and use tcp_chr_wait_connected, (continued)
- [Qemu-devel] [PATCH v6 24/33] char: add and use tcp_chr_wait_connected, marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 25/33] vhost-user: wait until backend init is completed, marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 26/33] tests: plug some leaks in virtio-net-test, marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 27/33] tests: fix vhost-user-test leak, marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 29/33] tests: add a simple /vhost-user/multiqueue test, marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 28/33] tests: add /vhost-user/connect-fail test, marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 30/33] vhost-user: add error report in vhost_user_write(), marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 31/33] vhost: add vhost_net_set_backend(), marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 32/33] vhost-user-test: add flags mismatch test, marcandre . lureau, 2016/07/26
- [Qemu-devel] [PATCH v6 33/33] RFC: vhost: do not update last avail idx on get_vring_base() failure,
marcandre . lureau <=
- Re: [Qemu-devel] [PATCH v6 00/33] vhost-user reconnect fixes, Michael S. Tsirkin, 2016/07/28