xref: /qemu/tests/qtest/libqos/vhost-user-blk.h (revision d0fb9657)
1 /*
2  * libqos driver framework
3  *
4  * Based on tests/qtest/libqos/virtio-blk.c
5  *
6  * Copyright (c) 2020 Coiby Xu <coiby.xu@gmail.com>
7  *
8  * Copyright (c) 2018 Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License version 2 as published by the Free Software Foundation.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, see <http://www.gnu.org/licenses/>
21  */
22 
23 #ifndef TESTS_LIBQOS_VHOST_USER_BLK_H
24 #define TESTS_LIBQOS_VHOST_USER_BLK_H
25 
26 #include "qgraph.h"
27 #include "virtio.h"
28 #include "virtio-pci.h"
29 
30 typedef struct QVhostUserBlk QVhostUserBlk;
31 typedef struct QVhostUserBlkPCI QVhostUserBlkPCI;
32 typedef struct QVhostUserBlkDevice QVhostUserBlkDevice;
33 
34 struct QVhostUserBlk {
35     QVirtioDevice *vdev;
36 };
37 
38 struct QVhostUserBlkPCI {
39     QVirtioPCIDevice pci_vdev;
40     QVhostUserBlk blk;
41 };
42 
43 struct QVhostUserBlkDevice {
44     QOSGraphObject obj;
45     QVhostUserBlk blk;
46 };
47 
48 #endif
49