xref: /openbmc/qemu/tests/qtest/libqos/virtio-blk.h (revision a2ce7dbd917a18408cf4bfd132578b46c2752a72)
11cf4323eSThomas Huth /*
21cf4323eSThomas Huth  * libqos driver framework
31cf4323eSThomas Huth  *
41cf4323eSThomas Huth  * Copyright (c) 2018 Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
51cf4323eSThomas Huth  *
61cf4323eSThomas Huth  * This library is free software; you can redistribute it and/or
71cf4323eSThomas Huth  * modify it under the terms of the GNU Lesser General Public
8dc0ad02dSThomas Huth  * License version 2.1 as published by the Free Software Foundation.
91cf4323eSThomas Huth  *
101cf4323eSThomas Huth  * This library is distributed in the hope that it will be useful,
111cf4323eSThomas Huth  * but WITHOUT ANY WARRANTY; without even the implied warranty of
121cf4323eSThomas Huth  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
131cf4323eSThomas Huth  * Lesser General Public License for more details.
141cf4323eSThomas Huth  *
151cf4323eSThomas Huth  * You should have received a copy of the GNU Lesser General Public
161cf4323eSThomas Huth  * License along with this library; if not, see <http://www.gnu.org/licenses/>
171cf4323eSThomas Huth  */
181cf4323eSThomas Huth 
191cf4323eSThomas Huth #ifndef TESTS_LIBQOS_VIRTIO_BLK_H
201cf4323eSThomas Huth #define TESTS_LIBQOS_VIRTIO_BLK_H
211cf4323eSThomas Huth 
22*a2ce7dbdSPaolo Bonzini #include "qgraph.h"
23*a2ce7dbdSPaolo Bonzini #include "virtio.h"
24*a2ce7dbdSPaolo Bonzini #include "virtio-pci.h"
251cf4323eSThomas Huth 
261cf4323eSThomas Huth typedef struct QVirtioBlk QVirtioBlk;
271cf4323eSThomas Huth typedef struct QVirtioBlkPCI QVirtioBlkPCI;
281cf4323eSThomas Huth typedef struct QVirtioBlkDevice QVirtioBlkDevice;
291cf4323eSThomas Huth 
301cf4323eSThomas Huth /* virtqueue is created in each test */
311cf4323eSThomas Huth struct QVirtioBlk {
321cf4323eSThomas Huth     QVirtioDevice *vdev;
331cf4323eSThomas Huth };
341cf4323eSThomas Huth 
351cf4323eSThomas Huth struct QVirtioBlkPCI {
361cf4323eSThomas Huth     QVirtioPCIDevice pci_vdev;
371cf4323eSThomas Huth     QVirtioBlk blk;
381cf4323eSThomas Huth };
391cf4323eSThomas Huth 
401cf4323eSThomas Huth struct QVirtioBlkDevice {
411cf4323eSThomas Huth     QOSGraphObject obj;
421cf4323eSThomas Huth     QVirtioBlk blk;
431cf4323eSThomas Huth };
441cf4323eSThomas Huth 
451cf4323eSThomas Huth #endif
46