OSDN Git Service

vhost: Return number of free memslots
authorDavid Hildenbrand <david@redhat.com>
Tue, 26 Sep 2023 18:57:25 +0000 (20:57 +0200)
committerDavid Hildenbrand <david@redhat.com>
Thu, 12 Oct 2023 12:15:22 +0000 (14:15 +0200)
commit8c49951c4ad9798cbe19f74f7645393ee625c180
treee47f59a52b9327693672285568036cceb2187c48
parent5b23186a954a88ecabb2696cd846e0e67a9e349c
vhost: Return number of free memslots

Let's return the number of free slots instead of only checking if there
is a free slot. Required to support memory devices that consume multiple
memslots.

This is a preparation for memory devices that consume multiple memslots.

Message-ID: <20230926185738.277351-6-david@redhat.com>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
hw/mem/memory-device.c
hw/virtio/vhost-stub.c
hw/virtio/vhost.c
include/hw/virtio/vhost.h