xref: /qemu/include/hw/virtio/vhost-user-scsi.h (revision 1b4a5a20daab8fe787dd8cef1c13973d44a0bcf0)
1f12c1ebdSFelipe Franciosi /*
2f12c1ebdSFelipe Franciosi  * vhost-user-scsi host device
3f12c1ebdSFelipe Franciosi  *
4f12c1ebdSFelipe Franciosi  * Copyright (c) 2016 Nutanix Inc. All rights reserved.
5f12c1ebdSFelipe Franciosi  *
6f12c1ebdSFelipe Franciosi  * Author:
7f12c1ebdSFelipe Franciosi  *  Felipe Franciosi <felipe@nutanix.com>
8f12c1ebdSFelipe Franciosi  *
9f12c1ebdSFelipe Franciosi  * This file is largely based on "vhost-scsi.h" by:
10f12c1ebdSFelipe Franciosi  *  Stefan Hajnoczi   <stefanha@linux.vnet.ibm.com>
11f12c1ebdSFelipe Franciosi  *
12f12c1ebdSFelipe Franciosi  * This work is licensed under the terms of the GNU LGPL, version 2 or later.
13f12c1ebdSFelipe Franciosi  * See the COPYING.LIB file in the top-level directory.
14f12c1ebdSFelipe Franciosi  *
15f12c1ebdSFelipe Franciosi  */
16f12c1ebdSFelipe Franciosi 
17f12c1ebdSFelipe Franciosi #ifndef VHOST_USER_SCSI_H
18f12c1ebdSFelipe Franciosi #define VHOST_USER_SCSI_H
19f12c1ebdSFelipe Franciosi 
20f12c1ebdSFelipe Franciosi #include "hw/virtio/virtio-scsi.h"
21f12c1ebdSFelipe Franciosi #include "hw/virtio/vhost.h"
224d0cf552STiwei Bie #include "hw/virtio/vhost-user.h"
23f12c1ebdSFelipe Franciosi #include "hw/virtio/vhost-scsi-common.h"
24db1015e9SEduardo Habkost #include "qom/object.h"
25f12c1ebdSFelipe Franciosi 
26f12c1ebdSFelipe Franciosi #define TYPE_VHOST_USER_SCSI "vhost-user-scsi"
278063396bSEduardo Habkost OBJECT_DECLARE_SIMPLE_TYPE(VHostUserSCSI, VHOST_USER_SCSI)
28f12c1ebdSFelipe Franciosi 
29db1015e9SEduardo Habkost struct VHostUserSCSI {
30f12c1ebdSFelipe Franciosi     VHostSCSICommon parent_obj;
31*7962e432SLi Feng 
32*7962e432SLi Feng     /* Properties */
33*7962e432SLi Feng     bool connected;
34*7962e432SLi Feng     bool started_vu;
35*7962e432SLi Feng 
360b99f224SMarc-André Lureau     VhostUserState vhost_user;
37*7962e432SLi Feng     struct vhost_virtqueue *vhost_vqs;
38db1015e9SEduardo Habkost };
39f12c1ebdSFelipe Franciosi 
40f12c1ebdSFelipe Franciosi #endif /* VHOST_USER_SCSI_H */
41