mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
23374a84c5
commit
6b0eff1a4e
3 changed files with 64 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue