]> git.proxmox.com Git - mirror_qemu.git/blame - tests/libqos/virtio-pci.h
target-arm: Add trace events for the generic timers
[mirror_qemu.git] / tests / libqos / virtio-pci.h
CommitLineData
311e666a
MM
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"
58368113 15
311e666a
MM
16typedef struct QVirtioPCIDevice {
17 QVirtioDevice vdev;
18 QPCIDevice *pdev;
46e0cf76 19 void *addr;
58368113
MM
20 uint16_t config_msix_entry;
21 uint64_t config_msix_addr;
22 uint32_t config_msix_data;
311e666a
MM
23} QVirtioPCIDevice;
24
58368113
MM
25typedef struct QVirtQueuePCI {
26 QVirtQueue vq;
27 uint16_t msix_entry;
28 uint64_t msix_addr;
29 uint32_t msix_data;
30} QVirtQueuePCI;
31
46e0cf76
MM
32extern const QVirtioBus qvirtio_pci;
33
311e666a
MM
34void qvirtio_pci_foreach(QPCIBus *bus, uint16_t device_type,
35 void (*func)(QVirtioDevice *d, void *data), void *data);
36QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type);
46e0cf76
MM
37void qvirtio_pci_device_enable(QVirtioPCIDevice *d);
38void qvirtio_pci_device_disable(QVirtioPCIDevice *d);
58368113
MM
39
40void qvirtio_pci_set_msix_configuration_vector(QVirtioPCIDevice *d,
41 QGuestAllocator *alloc, uint16_t entry);
42void qvirtqueue_pci_msix_setup(QVirtioPCIDevice *d, QVirtQueuePCI *vqpci,
43 QGuestAllocator *alloc, uint16_t entry);
311e666a 44#endif