qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/3] dataplane/virtio-blk.c: new API to enable notif


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH 2/3] dataplane/virtio-blk.c: new API to enable notifiers
Date: Tue, 7 Apr 2015 12:45:58 +0200

Switch to new API, no functional changes.

Signed-off-by: Michael S. Tsirkin <address@hidden>
---
 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




reply via email to

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