]> git.proxmox.com Git - mirror_qemu.git/commit
vhost: Remove vhost_backend_can_merge() callback
authorDavid Hildenbrand <david@redhat.com>
Tue, 26 Sep 2023 18:57:22 +0000 (20:57 +0200)
committerDavid Hildenbrand <david@redhat.com>
Thu, 12 Oct 2023 12:15:21 +0000 (14:15 +0200)
commit309ebfa691eb73648e77fc5a775986c12951df67
treef7a540b27cb2d3cd511ebd883c794c8881cbe118
parent552b25229cf7c65d31ac9a60b1d9202672dd9c61
vhost: Remove vhost_backend_can_merge() callback

Checking whether the memory regions are equal is sufficient: if they are
equal, then most certainly the contained fd is equal.

The whole vhost-user memslot handling is suboptimal and overly
complicated. We shouldn't have to lookup a RAM memory regions we got
notified about in vhost_user_get_mr_data() using a host pointer. But that
requires a bigger rework -- especially an alternative vhost_set_mem_table()
backend call that simply consumes MemoryRegionSections.

For now, let's just drop vhost_backend_can_merge().

Message-ID: <20230926185738.277351-3-david@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
hw/virtio/vhost-user.c
hw/virtio/vhost-vdpa.c
hw/virtio/vhost.c
include/hw/virtio/vhost-backend.h