s390x/kvm: fix cmma reset for KVM
[qemu/ar7.git] / tests / libqos / virtio-pci.h
blob38c54c63eaa52af18b9b44e34dca93ece4ae706e
1 /*
2 * libqos virtio PCI definitions
4 * Copyright (c) 2014 Marc MarĂ­
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 */
10 #ifndef LIBQOS_VIRTIO_PCI_H
11 #define LIBQOS_VIRTIO_PCI_H
13 #include "libqos/virtio.h"
14 #include "libqos/pci.h"
16 typedef struct QVirtioPCIDevice {
17 QVirtioDevice vdev;
18 QPCIDevice *pdev;
19 QPCIBar bar;
20 uint16_t config_msix_entry;
21 uint64_t config_msix_addr;
22 uint32_t config_msix_data;
23 } QVirtioPCIDevice;
25 typedef struct QVirtQueuePCI {
26 QVirtQueue vq;
27 uint16_t msix_entry;
28 uint64_t msix_addr;
29 uint32_t msix_data;
30 } QVirtQueuePCI;
32 extern const QVirtioBus qvirtio_pci;
34 void qvirtio_pci_foreach(QPCIBus *bus, uint16_t device_type,
35 void (*func)(QVirtioDevice *d, void *data), void *data);
36 QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type);
37 void qvirtio_pci_device_enable(QVirtioPCIDevice *d);
38 void qvirtio_pci_device_disable(QVirtioPCIDevice *d);
40 void qvirtio_pci_set_msix_configuration_vector(QVirtioPCIDevice *d,
41 QGuestAllocator *alloc, uint16_t entry);
42 void qvirtqueue_pci_msix_setup(QVirtioPCIDevice *d, QVirtQueuePCI *vqpci,
43 QGuestAllocator *alloc, uint16_t entry);
44 #endif