Skip to contentSkip to conversation

virtio: drop unused virtio_device_stop_ioeventfd() function

PATCH In review Stefan Hajnoczi 2 participants 2 messages Oct 21, 2019 – Oct 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio: drop unused virtio_device_stop_ioeventfd() function

virtio_device_stop_ioeventfd() has not been used since commit 310837de6c1e0badfd736b1b316b1698c53120a7 ("virtio: introduce grab/release_ioeventfd to fix vhost") in 2016.

Nowadays ioeventfd is stopped implicitly by the virtio transport when lifecycle events such as the VM pausing or device unplug occur.

---
 include/hw/virtio/virtio.h | 1 -
 hw/virtio/virtio.c         | 8 --------
 2 files changed, 9 deletions(-)
include/hw/virtio/virtio.h +0 -1
index 48e8d04ff6..14660ea30a 100644
@@ -302,7 +302,6 @@ EventNotifier *virtio_queue_get_guest_notifier(VirtQueue *vq);
 void virtio_queue_set_guest_notifier_fd_handler(VirtQueue *vq, bool assign,
                                                 bool with_irqfd);
 int virtio_device_start_ioeventfd(VirtIODevice *vdev);
-void virtio_device_stop_ioeventfd(VirtIODevice *vdev);
 int virtio_device_grab_ioeventfd(VirtIODevice *vdev);
 void virtio_device_release_ioeventfd(VirtIODevice *vdev);
 bool virtio_device_ioeventfd_enabled(VirtIODevice *vdev);
hw/virtio/virtio.c +0 -8
index 527df03bfd..05186a531c 100644
@@ -2773,14 +2773,6 @@ static void virtio_device_stop_ioeventfd_impl(VirtIODevice *vdev)
     }
 }
 
-void virtio_device_stop_ioeventfd(VirtIODevice *vdev)
-{
-    BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
-    VirtioBusState *vbus = VIRTIO_BUS(qbus);
-
-    virtio_bus_stop_ioeventfd(vbus);
-}
-
 int virtio_device_grab_ioeventfd(VirtIODevice *vdev)
 {
     BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Stefan Hajnoczi

virtio_device_stop_ioeventfd() has not been used since commit 310837de6c1e0badfd736b1b316b1698c53120a7 ("virtio: introduce grab/release_ioeventfd to fix vhost") in 2016.

Nowadays ioeventfd is stopped implicitly by the virtio transport when lifecycle events such as the VM pausing or device unplug occur.

Quoted 6 lines
---
 include/hw/virtio/virtio.h | 1 -
 hw/virtio/virtio.c         | 8 --------
 2 files changed, 9 deletions(-)
Quoted 36 lines
include/hw/virtio/virtio.h +0 -1
index 48e8d04ff6..14660ea30a 100644
@@ -302,7 +302,6 @@ EventNotifier *virtio_queue_get_guest_notifier(VirtQueue *vq);
 void virtio_queue_set_guest_notifier_fd_handler(VirtQueue *vq, bool assign,
                                                 bool with_irqfd);
 int virtio_device_start_ioeventfd(VirtIODevice *vdev);
-void virtio_device_stop_ioeventfd(VirtIODevice *vdev);
 int virtio_device_grab_ioeventfd(VirtIODevice *vdev);
 void virtio_device_release_ioeventfd(VirtIODevice *vdev);
 bool virtio_device_ioeventfd_enabled(VirtIODevice *vdev);
hw/virtio/virtio.c +0 -8
index 527df03bfd..05186a531c 100644
@@ -2773,14 +2773,6 @@ static void virtio_device_stop_ioeventfd_impl(VirtIODevice *vdev)
     }
 }
 
-void virtio_device_stop_ioeventfd(VirtIODevice *vdev)
-{
-    BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
-    VirtioBusState *vbus = VIRTIO_BUS(qbus);
-
-    virtio_bus_stop_ioeventfd(vbus);
-}
-
 int virtio_device_grab_ioeventfd(VirtIODevice *vdev)
 {
     BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
Signature · 1 line
2.21.0