summary refs log tree commit diff stats
path: root/include/hw/virtio/vhost-backend.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-10-09 17:17:24 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-10-22 14:34:49 +0300
commit1be0ac2109fbaca6e730ac578f0564507d173e2d (patch)
tree32ace8879e93a17585cfd26f62e94d22a32dcd2a /include/hw/virtio/vhost-backend.h
parentc2bea314f6a2870b847c79e2e11263c5f9334db7 (diff)
downloadfocaccia-qemu-1be0ac2109fbaca6e730ac578f0564507d173e2d.tar.gz
focaccia-qemu-1be0ac2109fbaca6e730ac578f0564507d173e2d.zip
vhost-user: add vhost_user_requires_shm_log()
Check if the backend has VHOST_USER_PROTOCOL_F_LOG_SHMFD feature and
require a shared log.

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 'include/hw/virtio/vhost-backend.h')
-rw-r--r--include/hw/virtio/vhost-backend.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
index c9035736db..c33570aeea 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -11,6 +11,8 @@
 #ifndef VHOST_BACKEND_H_
 #define VHOST_BACKEND_H_
 
+#include <stdbool.h>
+
 typedef enum VhostBackendType {
     VHOST_BACKEND_TYPE_NONE = 0,
     VHOST_BACKEND_TYPE_KERNEL = 1,
@@ -29,6 +31,7 @@ typedef int (*vhost_backend_set_vring_enable)(struct vhost_dev *dev, int enable)
 typedef int (*vhost_backend_memslots_limit)(struct vhost_dev *dev);
 
 typedef int (*vhost_set_log_base_op)(struct vhost_dev *dev, uint64_t base);
+typedef bool (*vhost_requires_shm_log_op)(struct vhost_dev *dev);
 
 typedef struct VhostOps {
     VhostBackendType backend_type;
@@ -39,6 +42,7 @@ typedef struct VhostOps {
     vhost_backend_set_vring_enable vhost_backend_set_vring_enable;
     vhost_backend_memslots_limit vhost_backend_memslots_limit;
     vhost_set_log_base_op vhost_set_log_base;
+    vhost_requires_shm_log_op vhost_requires_shm_log;
 } VhostOps;
 
 extern const VhostOps user_ops;