198fc1adaSDr. David Alan Gilbert /* 298fc1adaSDr. David Alan Gilbert * Vhost-user filesystem virtio device 398fc1adaSDr. David Alan Gilbert * 498fc1adaSDr. David Alan Gilbert * Copyright 2018-2019 Red Hat, Inc. 598fc1adaSDr. David Alan Gilbert * 698fc1adaSDr. David Alan Gilbert * Authors: 798fc1adaSDr. David Alan Gilbert * Stefan Hajnoczi <stefanha@redhat.com> 898fc1adaSDr. David Alan Gilbert * 998fc1adaSDr. David Alan Gilbert * This work is licensed under the terms of the GNU GPL, version 2 or 1098fc1adaSDr. David Alan Gilbert * (at your option) any later version. See the COPYING file in the 1198fc1adaSDr. David Alan Gilbert * top-level directory. 1298fc1adaSDr. David Alan Gilbert */ 1398fc1adaSDr. David Alan Gilbert 1498fc1adaSDr. David Alan Gilbert #ifndef _QEMU_VHOST_USER_FS_H 1598fc1adaSDr. David Alan Gilbert #define _QEMU_VHOST_USER_FS_H 1698fc1adaSDr. David Alan Gilbert 1798fc1adaSDr. David Alan Gilbert #include "hw/virtio/virtio.h" 1898fc1adaSDr. David Alan Gilbert #include "hw/virtio/vhost.h" 1998fc1adaSDr. David Alan Gilbert #include "hw/virtio/vhost-user.h" 2098fc1adaSDr. David Alan Gilbert #include "chardev/char-fe.h" 21*db1015e9SEduardo Habkost #include "qom/object.h" 2298fc1adaSDr. David Alan Gilbert 2398fc1adaSDr. David Alan Gilbert #define TYPE_VHOST_USER_FS "vhost-user-fs-device" 24*db1015e9SEduardo Habkost typedef struct VHostUserFS VHostUserFS; 2598fc1adaSDr. David Alan Gilbert #define VHOST_USER_FS(obj) \ 2698fc1adaSDr. David Alan Gilbert OBJECT_CHECK(VHostUserFS, (obj), TYPE_VHOST_USER_FS) 2798fc1adaSDr. David Alan Gilbert 2898fc1adaSDr. David Alan Gilbert typedef struct { 2998fc1adaSDr. David Alan Gilbert CharBackend chardev; 3098fc1adaSDr. David Alan Gilbert char *tag; 3198fc1adaSDr. David Alan Gilbert uint16_t num_request_queues; 3298fc1adaSDr. David Alan Gilbert uint16_t queue_size; 3398fc1adaSDr. David Alan Gilbert } VHostUserFSConf; 3498fc1adaSDr. David Alan Gilbert 35*db1015e9SEduardo Habkost struct VHostUserFS { 3698fc1adaSDr. David Alan Gilbert /*< private >*/ 3798fc1adaSDr. David Alan Gilbert VirtIODevice parent; 3898fc1adaSDr. David Alan Gilbert VHostUserFSConf conf; 3998fc1adaSDr. David Alan Gilbert struct vhost_virtqueue *vhost_vqs; 4098fc1adaSDr. David Alan Gilbert struct vhost_dev vhost_dev; 4198fc1adaSDr. David Alan Gilbert VhostUserState vhost_user; 422e5bc659SPan Nengyuan VirtQueue **req_vqs; 432e5bc659SPan Nengyuan VirtQueue *hiprio_vq; 4498fc1adaSDr. David Alan Gilbert 4598fc1adaSDr. David Alan Gilbert /*< public >*/ 46*db1015e9SEduardo Habkost }; 4798fc1adaSDr. David Alan Gilbert 4898fc1adaSDr. David Alan Gilbert #endif /* _QEMU_VHOST_USER_FS_H */ 49