Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190714' into staging
[qemu/ar7.git] / tests / libqos / pci-spapr.h
blobd9e25631c6a9a2c996e0b438ada497b943868cee
1 /*
2 * libqos PCI bindings for SPAPR
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
8 #ifndef LIBQOS_PCI_SPAPR_H
9 #define LIBQOS_PCI_SPAPR_H
11 #include "libqos/malloc.h"
12 #include "libqos/pci.h"
13 #include "libqos/qgraph.h"
15 /* From include/hw/pci-host/spapr.h */
17 typedef struct QPCIWindow {
18 uint64_t pci_base; /* window address in PCI space */
19 uint64_t size; /* window size */
20 } QPCIWindow;
22 typedef struct QPCIBusSPAPR {
23 QOSGraphObject obj;
24 QPCIBus bus;
25 QGuestAllocator *alloc;
27 uint64_t buid;
29 uint64_t pio_cpu_base;
30 QPCIWindow pio;
32 uint64_t mmio32_cpu_base;
33 QPCIWindow mmio32;
34 } QPCIBusSPAPR;
36 void qpci_init_spapr(QPCIBusSPAPR *ret, QTestState *qts,
37 QGuestAllocator *alloc);
38 QPCIBus *qpci_new_spapr(QTestState *qts, QGuestAllocator *alloc);
39 void qpci_free_spapr(QPCIBus *bus);
41 #endif