Received: from eggs.gnu.org ([2001:4830:134:3::10]:59426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfRnH-0001pY-II for qemu-devel@nongnu.org; Tue, 07 Apr 2015 07:35:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfRnD-0007mp-3s for qemu-devel@nongnu.org; Tue, 07 Apr 2015 07:35:47 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:60514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfRnC-0007mk-L1 for qemu-devel@nongnu.org; Tue, 07 Apr 2015 07:35:43 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Apr 2015 12:35:40 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6B9641B08061 for ; Tue, 7 Apr 2015 12:36:10 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t37BZdi754067424 for ; Tue, 7 Apr 2015 11:35:39 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t37BZdbN026943 for ; Tue, 7 Apr 2015 05:35:39 -0600 Date: Tue, 7 Apr 2015 13:35:35 +0200 From: Cornelia Huck Message-ID: <20150407133535.6c85eed4.cornelia.huck@de.ibm.com> In-Reply-To: <1428403546-31914-3-git-send-email-mst@redhat.com> References: <1428403546-31914-1-git-send-email-mst@redhat.com> <1428403546-31914-3-git-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] dataplane/virtio-blk.c: new API to enable notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , Jason Wang , qemu-devel@nongnu.org, Stefan Hajnoczi On Tue, 7 Apr 2015 12:45:58 +0200 "Michael S. Tsirkin" wrote: > Switch to new API, no functional changes. > > Signed-off-by: Michael S. Tsirkin > --- > 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);