qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcel@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call
Date: Wed, 12 Aug 2015 13:19:51 +0300	[thread overview]
Message-ID: <1439374791-25879-1-git-send-email-marcel@redhat.com> (raw)

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

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
---
 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	other threads:[~2015-08-12 10:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 10:19 Marcel Apfelbaum [this message]
2015-08-12 10:34 ` [Qemu-devel] [PATCH] virtio/vhost: drop unnecessary VHOST_SET_VRING call Michael S. Tsirkin
2015-08-12 11:10   ` Marcel Apfelbaum
2015-08-12 11:15     ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439374791-25879-1-git-send-email-marcel@redhat.com \
    --to=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).