On Tue, 7 Apr 2015 12:45:58 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote:
> Switch to new API, no functional changes. > > Signed-off-by: Michael S. Tsirkin <m...@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); This one is supposed to disable the guest notifier, not the host notifier. > 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);