aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqos/pci-spapr.h
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-09-10 16:41:20 +0200
committerThomas Huth <thuth@redhat.com>2020-01-12 11:42:41 +0100
commit1cf4323ecd03235984e43a416a42f10c975cf785 (patch)
tree57ad5475a4cbbbe0088aecf86b682d8e11150b9f /tests/qtest/libqos/pci-spapr.h
parent833884f37adc9f125fa2f345704d7019b8651619 (diff)
downloadqemu-1cf4323ecd03235984e43a416a42f10c975cf785.zip
qemu-1cf4323ecd03235984e43a416a42f10c975cf785.tar.gz
qemu-1cf4323ecd03235984e43a416a42f10c975cf785.tar.bz2
tests/libqos: Move the libqos files under tests/qtest/
The qos stuff belongs to qtest, so move it into that directory, too. Message-Id: <20191218103059.11729-8-thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/libqos/pci-spapr.h')
-rw-r--r--tests/qtest/libqos/pci-spapr.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/qtest/libqos/pci-spapr.h b/tests/qtest/libqos/pci-spapr.h
new file mode 100644
index 0000000..d9e2563
--- /dev/null
+++ b/tests/qtest/libqos/pci-spapr.h
@@ -0,0 +1,41 @@
+/*
+ * libqos PCI bindings for SPAPR
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef LIBQOS_PCI_SPAPR_H
+#define LIBQOS_PCI_SPAPR_H
+
+#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);
+
+#endif