summaryrefslogtreecommitdiffstats
path: root/include/hw/virtio/vhost-user.h
diff options
context:
space:
mode:
authorRaphael Norwitz2020-05-21 07:00:32 +0200
committerMichael S. Tsirkin2020-06-12 16:17:06 +0200
commit6b0eff1a4ea47c835a7d8bee88c05c47ada37495 (patch)
tree17ed939bd48af59b703e44c71d894ec30b6f55a5 /include/hw/virtio/vhost-user.h
parentAdd vhost-user helper to get MemoryRegion data (diff)
downloadqemu-6b0eff1a4ea47c835a7d8bee88c05c47ada37495.tar.gz
qemu-6b0eff1a4ea47c835a7d8bee88c05c47ada37495.tar.xz
qemu-6b0eff1a4ea47c835a7d8bee88c05c47ada37495.zip
Add VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS
This change introduces a new feature to the vhost-user protocol allowing a backend device to specify the maximum number of ram slots it supports. At this point, the value returned by the backend will be capped at the maximum number of ram slots which can be supported by vhost-user, which is currently set to 8 because of underlying protocol limitations. The returned value will be stored inside the VhostUserState struct so that on device reconnect we can verify that the ram slot limitation has not decreased since the last time the device connected. Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com> Signed-off-by: Peter Turschmid <peter.turschm@nutanix.com> Message-Id: <1588533678-23450-4-git-send-email-raphael.norwitz@nutanix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'include/hw/virtio/vhost-user.h')
-rw-r--r--include/hw/virtio/vhost-user.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-user.h b/include/hw/virtio/vhost-user.h
index 811e325f42..a9abca3288 100644
--- a/include/hw/virtio/vhost-user.h
+++ b/include/hw/virtio/vhost-user.h
@@ -20,6 +20,7 @@ typedef struct VhostUserHostNotifier {
typedef struct VhostUserState {
CharBackend *chr;
VhostUserHostNotifier notifier[VIRTIO_QUEUE_MAX];
+ int memory_slots;
} VhostUserState;
bool vhost_user_init(VhostUserState *user, CharBackend *chr, Error **errp);