mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
c2bea314f6
commit
1be0ac2109
2 changed files with 16 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue