From patchwork Tue Apr 7 10:45:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 458626 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D6F7C14009B for ; Tue, 7 Apr 2015 20:47:49 +1000 (AEST) Received: from localhost ([::1]:44201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfR2p-0006KP-S3 for incoming@patchwork.ozlabs.org; Tue, 07 Apr 2015 06:47:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfR1A-0003nn-Gf for qemu-devel@nongnu.org; Tue, 07 Apr 2015 06:46:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfR19-00088a-M2 for qemu-devel@nongnu.org; Tue, 07 Apr 2015 06:46:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfR19-00088W-EP for qemu-devel@nongnu.org; Tue, 07 Apr 2015 06:46:03 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t37Ak1pl004066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 7 Apr 2015 06:46:02 -0400 Received: from redhat.com (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t37Ajxf8022880; Tue, 7 Apr 2015 06:45:59 -0400 Date: Tue, 7 Apr 2015 12:45:58 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1428403546-31914-3-git-send-email-mst@redhat.com> References: <1428403546-31914-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1428403546-31914-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Jason Wang , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 2/3] dataplane/virtio-blk.c: new API to enable notifiers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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); 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);