aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/vhost-backend.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-10-09 17:17:23 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-10-22 14:34:49 +0300
commitc2bea314f6a2870b847c79e2e11263c5f9334db7 (patch)
tree4c59a51399045a2e0dab678f2f02f53bbdd6eded /hw/virtio/vhost-backend.c
parent636f4dddfe48ccabaf5198bba440354d6a268d62 (diff)
vhost: add vhost_set_log_base op
Split VHOST_SET_LOG_BASE call in a seperate function callback, so that type safety works and more arguments can be added in the next patches. 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>
Diffstat (limited to 'hw/virtio/vhost-backend.c')
-rw-r--r--hw/virtio/vhost-backend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index 910d8e00e3..5846c37f6d 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -67,6 +67,11 @@ 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)
+{
+ return vhost_kernel_call(dev, VHOST_SET_LOG_BASE, &base);
+}
+
static const VhostOps kernel_ops = {
.backend_type = VHOST_BACKEND_TYPE_KERNEL,
.vhost_call = vhost_kernel_call,
@@ -74,6 +79,7 @@ static const VhostOps kernel_ops = {
.vhost_backend_cleanup = vhost_kernel_cleanup,
.vhost_backend_get_vq_index = vhost_kernel_get_vq_index,
.vhost_backend_memslots_limit = vhost_kernel_memslots_limit,
+ .vhost_set_log_base = vhost_set_log_base,
};
int vhost_set_backend_type(struct vhost_dev *dev, VhostBackendType backend_type)