]> Git Repo - qemu.git/commit
Transmit vhost-user memory regions individually
authorRaphael Norwitz <[email protected]>
Thu, 21 May 2020 05:00:35 +0000 (05:00 +0000)
committerMichael S. Tsirkin <[email protected]>
Fri, 12 Jun 2020 14:17:06 +0000 (10:17 -0400)
commitf1aeb14b0809e313c74244d838645ed25e85ea63
treed08bdd311c32cf05f77d9fca1a26281b966ba061
parent6b0eff1a4ea47c835a7d8bee88c05c47ada37495
Transmit vhost-user memory regions individually

With this change, when the VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS
protocol feature has been negotiated, Qemu no longer sends the backend
all the memory regions in a single message. Rather, when the memory
tables are set or updated, a series of VHOST_USER_ADD_MEM_REG and
VHOST_USER_REM_MEM_REG messages are sent to transmit the regions to map
and/or unmap instead of sending send all the regions in one fixed size
VHOST_USER_SET_MEM_TABLE message.

The vhost_user struct maintains a shadow state of the VM’s memory
regions. When the memory tables are modified, the
vhost_user_set_mem_table() function compares the new device memory state
to the shadow state and only sends regions which need to be unmapped or
mapped in. The regions which must be unmapped are sent first, followed
by the new regions to be mapped in. After all the messages have been
sent, the shadow state is set to the current virtual device state.

Existing backends which do not support
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS are unaffected.

Signed-off-by: Raphael Norwitz <[email protected]>
Signed-off-by: Swapnil Ingle <[email protected]>
Signed-off-by: Peter Turschmid <[email protected]>
Suggested-by: Mike Cui <[email protected]>
Message-Id: <1588533678[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Marc-André Lureau <[email protected]>
docs/interop/vhost-user.rst
hw/virtio/vhost-user.c
This page took 0.025321 seconds and 4 git commands to generate.