mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
tests/libqos: pci-spapr driver and interface nodes
Add pci-bus-spapr node, that produces pci-bus. Move QPCIBusSPAPR struct declaration in its header (since it will be needed by other drivers) and introduce a setter method for drivers that do not need to allocate but have to initialize QPCIBusSPAPR. Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
db1f266838
commit
b8782d2a47
3 changed files with 88 additions and 54 deletions
|
@ -10,7 +10,31 @@
|
|||
|
||||
#include "libqos/malloc.h"
|
||||
#include "libqos/pci.h"
|
||||
#include "libqos/qgraph.h"
|
||||
|
||||
/* From include/hw/pci-host/spapr.h */
|
||||
|
||||
typedef struct QPCIWindow {
|
||||
uint64_t pci_base; /* window address in PCI space */
|
||||
uint64_t size; /* window size */
|
||||
} QPCIWindow;
|
||||
|
||||
typedef struct QPCIBusSPAPR {
|
||||
QOSGraphObject obj;
|
||||
QPCIBus bus;
|
||||
QGuestAllocator *alloc;
|
||||
|
||||
uint64_t buid;
|
||||
|
||||
uint64_t pio_cpu_base;
|
||||
QPCIWindow pio;
|
||||
|
||||
uint64_t mmio32_cpu_base;
|
||||
QPCIWindow mmio32;
|
||||
} QPCIBusSPAPR;
|
||||
|
||||
void qpci_init_spapr(QPCIBusSPAPR *ret, QTestState *qts,
|
||||
QGuestAllocator *alloc);
|
||||
QPCIBus *qpci_new_spapr(QTestState *qts, QGuestAllocator *alloc);
|
||||
void qpci_free_spapr(QPCIBus *bus);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue