MAINTAINERS: Make section QOM cover hw/core/*bus.c as well
[qemu/armbru.git] / include / hw / virtio / vhost-user-blk.h
blob34ad6f0c0e2d967dec2dde3ebac5b99b6f89b71b
1 /*
2 * vhost-user-blk host device
3 * Copyright(C) 2017 Intel Corporation.
5 * Authors:
6 * Changpeng Liu <changpeng.liu@intel.com>
8 * Based on vhost-scsi.h, Copyright IBM, Corp. 2011
10 * This work is licensed under the terms of the GNU LGPL, version 2 or later.
11 * See the COPYING.LIB file in the top-level directory.
15 #ifndef VHOST_USER_BLK_H
16 #define VHOST_USER_BLK_H
18 #include "standard-headers/linux/virtio_blk.h"
19 #include "hw/block/block.h"
20 #include "chardev/char-fe.h"
21 #include "hw/virtio/vhost.h"
22 #include "hw/virtio/vhost-user.h"
24 #define TYPE_VHOST_USER_BLK "vhost-user-blk"
25 #define VHOST_USER_BLK(obj) \
26 OBJECT_CHECK(VHostUserBlk, (obj), TYPE_VHOST_USER_BLK)
28 typedef struct VHostUserBlk {
29 VirtIODevice parent_obj;
30 CharBackend chardev;
31 int32_t bootindex;
32 struct virtio_blk_config blkcfg;
33 uint16_t num_queues;
34 uint32_t queue_size;
35 uint32_t config_wce;
36 struct vhost_dev dev;
37 struct vhost_inflight *inflight;
38 VhostUserState vhost_user;
39 struct vhost_virtqueue *vhost_vqs;
40 VirtQueue **virtqs;
41 bool connected;
42 } VHostUserBlk;
44 #endif