xref: /openbmc/qemu/include/hw/virtio/vhost-user-fs.h (revision 6016b7b4)
1 /*
2  * Vhost-user filesystem virtio device
3  *
4  * Copyright 2018-2019 Red Hat, Inc.
5  *
6  * Authors:
7  *  Stefan Hajnoczi <stefanha@redhat.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2 or
10  * (at your option) any later version.  See the COPYING file in the
11  * top-level directory.
12  */
13 
14 #ifndef _QEMU_VHOST_USER_FS_H
15 #define _QEMU_VHOST_USER_FS_H
16 
17 #include "hw/virtio/virtio.h"
18 #include "hw/virtio/vhost.h"
19 #include "hw/virtio/vhost-user.h"
20 #include "chardev/char-fe.h"
21 #include "qom/object.h"
22 
23 #define TYPE_VHOST_USER_FS "vhost-user-fs-device"
24 OBJECT_DECLARE_SIMPLE_TYPE(VHostUserFS, VHOST_USER_FS)
25 
26 typedef struct {
27     CharBackend chardev;
28     char *tag;
29     uint16_t num_request_queues;
30     uint16_t queue_size;
31 } VHostUserFSConf;
32 
33 struct VHostUserFS {
34     /*< private >*/
35     VirtIODevice parent;
36     VHostUserFSConf conf;
37     struct vhost_virtqueue *vhost_vqs;
38     struct vhost_dev vhost_dev;
39     VhostUserState vhost_user;
40     VirtQueue **req_vqs;
41     VirtQueue *hiprio_vq;
42     int32_t bootindex;
43 
44     /*< public >*/
45 };
46 
47 #endif /* _QEMU_VHOST_USER_FS_H */
48