aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
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/virtio
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/virtio')
-rw-r--r--hw/virtio/vhost.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index bce1b6e..a01394d 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1110,7 +1110,7 @@ int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev)
VirtioBusState *vbus = VIRTIO_BUS(qbus);
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(vbus);
int i, r, e;
- if (!k->set_host_notifier || !k->ioeventfd_started) {
+ if (!k->ioeventfd_started) {
fprintf(stderr, "binding does not support host notifiers\n");
r = -ENOSYS;
goto fail;
@@ -1119,9 +1119,6 @@ int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev)
for (i = 0; i < hdev->nvqs; ++i) {
r = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), hdev->vq_index + i,
true);
- if (r == -ENOSYS) {
- r = k->set_host_notifier(qbus->parent, hdev->vq_index + i, true);
- }
if (r < 0) {
fprintf(stderr, "vhost VQ %d notifier binding failed: %d\n", i, -r);
goto fail_vq;
@@ -1133,9 +1130,6 @@ fail_vq:
while (--i >= 0) {
e = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), hdev->vq_index + i,
false);
- if (e == -ENOSYS) {
- e = k->set_host_notifier(qbus->parent, hdev->vq_index + i, false);
- }
if (e < 0) {
fprintf(stderr, "vhost VQ %d notifier cleanup error: %d\n", i, -r);
fflush(stderr);
@@ -1154,16 +1148,11 @@ fail:
void vhost_dev_disable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev)
{
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vdev)));
- VirtioBusState *vbus = VIRTIO_BUS(qbus);
- VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(vbus);
int i, r;
for (i = 0; i < hdev->nvqs; ++i) {
r = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), hdev->vq_index + i,
false);
- if (r == -ENOSYS) {
- r = k->set_host_notifier(qbus->parent, hdev->vq_index + i, false);
- }
if (r < 0) {
fprintf(stderr, "vhost VQ %d notifier cleanup failed: %d\n", i, -r);
fflush(stderr);