qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio: drop unused virtio_device_stop_ioeventfd() function
@ 2019-10-21 15:03 Stefan Hajnoczi
  2019-10-22  8:02 ` Stefano Garzarella
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2019-10-21 15:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Stefan Hajnoczi, Michael S. Tsirkin

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.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 include/hw/virtio/virtio.h | 1 -
 hw/virtio/virtio.c         | 8 --------
 2 files changed, 9 deletions(-)

diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 48e8d04ff6..14660ea30a 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -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);
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 527df03bfd..05186a531c 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -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));
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] virtio: drop unused virtio_device_stop_ioeventfd() function
  2019-10-21 15:03 [PATCH] virtio: drop unused virtio_device_stop_ioeventfd() function Stefan Hajnoczi
@ 2019-10-22  8:02 ` Stefano Garzarella
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Garzarella @ 2019-10-22  8:02 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Paolo Bonzini, qemu-devel, Michael S. Tsirkin

On Mon, Oct 21, 2019 at 04:03:43PM +0100, Stefan Hajnoczi wrote:
> 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.
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  include/hw/virtio/virtio.h | 1 -
>  hw/virtio/virtio.c         | 8 --------
>  2 files changed, 9 deletions(-)

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

> 
> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> index 48e8d04ff6..14660ea30a 100644
> --- a/include/hw/virtio/virtio.h
> +++ b/include/hw/virtio/virtio.h
> @@ -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);
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index 527df03bfd..05186a531c 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -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));
> -- 
> 2.21.0
> 
> 

-- 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-22  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-21 15:03 [PATCH] virtio: drop unused virtio_device_stop_ioeventfd() function Stefan Hajnoczi
2019-10-22  8:02 ` Stefano Garzarella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).