vhost-user: send log shm fd along with log_base

Send the shm for the dirty pages logging if the backend supports
VHOST_USER_PROTOCOL_F_LOG_SHMFD. Wait for a reply to make sure
the old log is no longer used.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
This commit is contained in:
Marc-André Lureau 2015-10-09 17:17:26 +02:00 committed by Michael S. Tsirkin
parent 15324404f6
commit 9a78a5dd27
4 changed files with 33 additions and 6 deletions

View file

@ -67,7 +67,8 @@ static int vhost_kernel_memslots_limit(struct vhost_dev *dev)
return limit;
}
static int vhost_set_log_base(struct vhost_dev *dev, uint64_t base)
static int vhost_set_log_base(struct vhost_dev *dev, uint64_t base,
struct vhost_log *log)
{
return vhost_kernel_call(dev, VHOST_SET_LOG_BASE, &base);
}