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