qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Jason Wang <jasowang@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] dataplane/virtio-blk.c: new API to enable notifiers
Date: Tue, 7 Apr 2015 12:45:58 +0200	[thread overview]
Message-ID: <1428403546-31914-3-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1428403546-31914-1-git-send-email-mst@redhat.com>

Switch to new API, no functional changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/block/dataplane/virtio-blk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index cd41478..c9ac70e 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -263,7 +263,7 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
     s->guest_notifier = virtio_queue_get_guest_notifier(vq);
 
     /* Set up virtqueue notify */
-    r = k->set_host_notifier(qbus->parent, 0, true);
+    r = virtio_enable_host_notifiers(s->vdev, 0, 1);
     if (r != 0) {
         fprintf(stderr, "virtio-blk failed to set host notifier (%d)\n", r);
         goto fail_host_notifier;
@@ -289,7 +289,7 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
     return;
 
   fail_host_notifier:
-    k->set_guest_notifiers(qbus->parent, 1, false);
+    virtio_disable_host_notifiers(s->vdev, 0, 1);
   fail_guest_notifiers:
     vring_teardown(&s->vring, s->vdev, 0);
     s->disabled = true;
@@ -332,7 +332,7 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
      */
     vring_teardown(&s->vring, s->vdev, 0);
 
-    k->set_host_notifier(qbus->parent, 0, false);
+    virtio_disable_host_notifiers(s->vdev, 0, 1);
 
     /* Clean up guest notifier (irq) */
     k->set_guest_notifiers(qbus->parent, 1, false);
-- 
MST

  parent reply	other threads:[~2015-04-07 10:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 10:45 [Qemu-devel] [PATCH 0/3] virtio: host notifier API cleanup Michael S. Tsirkin
2015-04-07 10:45 ` [Qemu-devel] [PATCH 1/3] virtio: interface to enable/disable host notifiers Michael S. Tsirkin
2015-04-07 11:32   ` Cornelia Huck
2015-04-07 10:45 ` Michael S. Tsirkin [this message]
2015-04-07 11:35   ` [Qemu-devel] [PATCH 2/3] dataplane/virtio-blk.c: new API to enable notifiers Cornelia Huck
2015-04-07 10:46 ` [Qemu-devel] [PATCH 3/3] dataplane/virtio-scsi: new API to enable host notifiers Michael S. Tsirkin
2015-04-07 11:41   ` Cornelia Huck

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=1428403546-31914-3-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).