Skip to contentSkip to conversation

vhost: Drop unused eventfd_add|del hooks

PATCH In review Peter Xu 3 participants 3 messages Mar 6, 2023 – Mar 7, 2023

lore
Share & tools
lore

Peter Xu

author
#0 lore raw

PATCH 1/1 vhost: Drop unused eventfd_add|del hooks

These hooks were introduced in:

80a1ea3748 ("memory: move ioeventfd ops to MemoryListener", 2012-02-29)

But they seem to be never used. Drop them.

Cc Richard Henderson <[email protected]>
---
 hw/virtio/vhost.c | 14 --------------
 1 file changed, 14 deletions(-)
hw/virtio/vhost.c +0 -14
index eb8c4c378c..c713dc5d9d 100644
@@ -1291,18 +1291,6 @@ void vhost_virtqueue_stop(struct vhost_dev *dev,
                        0, virtio_queue_get_desc_size(vdev, idx));
 }
 
-static void vhost_eventfd_add(MemoryListener *listener,
-                              MemoryRegionSection *section,
-                              bool match_data, uint64_t data, EventNotifier *e)
-{
-}
-
-static void vhost_eventfd_del(MemoryListener *listener,
-                              MemoryRegionSection *section,
-                              bool match_data, uint64_t data, EventNotifier *e)
-{
-}
-
 static int vhost_virtqueue_set_busyloop_timeout(struct vhost_dev *dev,
                                                 int n, uint32_t timeout)
 {
@@ -1457,8 +1445,6 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
         .log_sync = vhost_log_sync,
         .log_global_start = vhost_log_global_start,
         .log_global_stop = vhost_log_global_stop,
-        .eventfd_add = vhost_eventfd_add,
-        .eventfd_del = vhost_eventfd_del,
         .priority = 10
     };
 
Signature · 1 line
2.39.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Peter Xu

These hooks were introduced in:

80a1ea3748 ("memory: move ioeventfd ops to MemoryListener", 2012-02-29)

But they seem to be never used. Drop them.

Similar to bf83601fdd ("xen: drop no-op MemoryListener callbacks") few months later...

Quoted 5 lines
Cc Richard Henderson <[email protected]>
---
  hw/virtio/vhost.c | 14 --------------
  1 file changed, 14 deletions(-)
Acked-by on v1 1/1
#2 lore raw
In reply to Peter Xu
Quoted 9 lines · Peter Xu

These hooks were introduced in:

80a1ea3748 ("memory: move ioeventfd ops to MemoryListener", 2012-02-29)

But they seem to be never used. Drop them.

Cc Richard Henderson <[email protected]>

Thanks

Quoted 39 lines
---
 hw/virtio/vhost.c | 14 --------------
 1 file changed, 14 deletions(-)
hw/virtio/vhost.c +0 -15
index eb8c4c378c..c713dc5d9d 100644
@@ -1291,18 +1291,6 @@ void vhost_virtqueue_stop(struct vhost_dev *dev,
                        0, virtio_queue_get_desc_size(vdev, idx));
 }
 
-static void vhost_eventfd_add(MemoryListener *listener,
-                              MemoryRegionSection *section,
-                              bool match_data, uint64_t data, EventNotifier *e)
-{
-}
-
-static void vhost_eventfd_del(MemoryListener *listener,
-                              MemoryRegionSection *section,
-                              bool match_data, uint64_t data, EventNotifier *e)
-{
-}
-
 static int vhost_virtqueue_set_busyloop_timeout(struct vhost_dev *dev,
                                                 int n, uint32_t timeout)
 {
@@ -1457,8 +1445,6 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
         .log_sync = vhost_log_sync,
         .log_global_start = vhost_log_global_start,
         .log_global_stop = vhost_log_global_stop,
-        .eventfd_add = vhost_eventfd_add,
-        .eventfd_del = vhost_eventfd_del,
         .priority = 10
     };
 
--

2.39.1