qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call


From: Marcel Apfelbaum
Subject: [Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call
Date: Wed, 12 Aug 2015 13:19:51 +0300

No need to send VHOST_SET_VRING_CALL to backend
before the negotiation with the guest is finished.

Signed-off-by: Marcel Apfelbaum <address@hidden>
---
 hw/virtio/vhost.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 2712c6f..b448542 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -875,24 +875,13 @@ static void vhost_eventfd_del(MemoryListener *listener,
 static int vhost_virtqueue_init(struct vhost_dev *dev,
                                 struct vhost_virtqueue *vq, int n)
 {
-    struct vhost_vring_file file = {
-        .index = n,
-    };
     int r = event_notifier_init(&vq->masked_notifier, 0);
+
     if (r < 0) {
         return r;
     }
 
-    file.fd = event_notifier_get_fd(&vq->masked_notifier);
-    r = dev->vhost_ops->vhost_call(dev, VHOST_SET_VRING_CALL, &file);
-    if (r) {
-        r = -errno;
-        goto fail_call;
-    }
     return 0;
-fail_call:
-    event_notifier_cleanup(&vq->masked_notifier);
-    return r;
 }
 
 static void vhost_virtqueue_cleanup(struct vhost_virtqueue *vq)
-- 
2.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]