aboutsummaryrefslogtreecommitdiff
path: root/hw/block/dataplane
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2016-06-10 11:04:14 +0200
committerMichael S. Tsirkin <mst@redhat.com>2016-06-24 08:47:35 +0300
commit21a4d96243e60a4c8eeb124a023b8a3bd9120e18 (patch)
treefce1969574c37a87816c17f98d4fd5a9f818bf00 /hw/block/dataplane
parentc0971bcb7c3320e991b8913253b6344096fa15fd (diff)
downloadqemu-21a4d96243e60a4c8eeb124a023b8a3bd9120e18.zip
qemu-21a4d96243e60a4c8eeb124a023b8a3bd9120e18.tar.gz
qemu-21a4d96243e60a4c8eeb124a023b8a3bd9120e18.tar.bz2
virtio-bus: remove old set_host_notifier callback
All users have been converted to the new ioevent callbacks. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/block/dataplane')
-rw-r--r--hw/block/dataplane/virtio-blk.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index fdf5fd1..2041b04 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -79,8 +79,7 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,
}
/* Don't try if transport does not support notifiers. */
- if (!k->set_guest_notifiers ||
- (!k->set_host_notifier && !k->ioeventfd_started)) {
+ if (!k->set_guest_notifiers || !k->ioeventfd_started) {
error_setg(errp,
"device is incompatible with dataplane "
"(transport does not support notifiers)");
@@ -159,9 +158,6 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
/* Set up virtqueue notify */
r = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), 0, true);
- if (r == -ENOSYS) {
- r = k->set_host_notifier(qbus->parent, 0, true);
- }
if (r != 0) {
fprintf(stderr, "virtio-blk failed to set host notifier (%d)\n", r);
goto fail_host_notifier;
@@ -197,7 +193,6 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s->vdev)));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
VirtIOBlock *vblk = VIRTIO_BLK(s->vdev);
- int r;
if (!vblk->dataplane_started || s->stopping) {
return;
@@ -222,10 +217,7 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
aio_context_release(s->ctx);
- r = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), 0, false);
- if (r == -ENOSYS) {
- k->set_host_notifier(qbus->parent, 0, false);
- }
+ virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), 0, false);
/* Clean up guest notifier (irq) */
k->set_guest_notifiers(qbus->parent, 1, false);