]> git.proxmox.com Git - mirror_qemu.git/commit
vhost-user: Support transferring inflight buffer between qemu and backend
authorXie Yongji <xieyongji@baidu.com>
Thu, 28 Feb 2019 08:53:49 +0000 (16:53 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 13 Mar 2019 02:31:21 +0000 (22:31 -0400)
commit5ad204bf2a06bf29234df9e6f1ef6c566771b40c
tree14ae9d6c8aeb387104d49e015e98e777dcab3e38
parent1b8fff57584d04a94cc77b8d3f535d35f5827a5e
vhost-user: Support transferring inflight buffer between qemu and backend

This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared
buffer between qemu and backend.

Firstly, qemu uses VHOST_USER_GET_INFLIGHT_FD to get the
shared buffer from backend. Then qemu should send it back
through VHOST_USER_SET_INFLIGHT_FD each time we start vhost-user.

This shared buffer is used to track inflight I/O by backend.
Qemu should retrieve a new one when vm reset.

Signed-off-by: Xie Yongji <xieyongji@baidu.com>
Signed-off-by: Chai Wen <chaiwen@baidu.com>
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Message-Id: <20190228085355.9614-2-xieyongji@baidu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
docs/interop/vhost-user.txt
hw/virtio/vhost-user.c
hw/virtio/vhost.c
include/hw/virtio/vhost-backend.h
include/hw/virtio/vhost.h