libvhost-user: Dynamically allocate memory for memory slots
authorDavid Hildenbrand <david@redhat.com>
Wed, 14 Feb 2024 15:16:48 +0000 (16:16 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 12 Mar 2024 21:56:55 +0000 (17:56 -0400)
commitd884e2727849fc95d337262ec91be60165473c4a
tree78dd4310e844fdf7663c2db35cb5bc9cdab079a0
parent9ed62809b6e28ab0d887aff502ed24f77f1edafd
libvhost-user: Dynamically allocate memory for memory slots

Let's prepare for increasing VHOST_USER_MAX_RAM_SLOTS by dynamically
allocating dev->regions. We don't have any ABI guarantees (not
dynamically linked), so we can simply change the layout of VuDev.

Let's zero out the memory, just as we used to do.

Reviewed-by: Raphael Norwitz <raphael@enfabrica.net>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20240214151701.29906-2-david@redhat.com>
Tested-by: Mario Casquero <mcasquer@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
subprojects/libvhost-user/libvhost-user.c
subprojects/libvhost-user/libvhost-user.h