xref: /qemu/tests/qtest/libqos/virtio-pci.h (revision 311e666aea7164b6d3b8a7e845fb32a509bfdf08)
1 /*
2  * libqos virtio PCI definitions
3  *
4  * Copyright (c) 2014 Marc Marí
5  *
6  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7  * See the COPYING file in the top-level directory.
8  */
9 
10 #ifndef LIBQOS_VIRTIO_PCI_H
11 #define LIBQOS_VIRTIO_PCI_H
12 
13 #include "libqos/virtio.h"
14 #include "libqos/pci.h"
15 
16 typedef struct QVirtioPCIDevice {
17     QVirtioDevice vdev;
18     QPCIDevice *pdev;
19 } QVirtioPCIDevice;
20 
21 void qvirtio_pci_foreach(QPCIBus *bus, uint16_t device_type,
22                 void (*func)(QVirtioDevice *d, void *data), void *data);
23 QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type);
24 #endif
25