aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2024-05-30 17:44:49 +1000
committerFabiano Rosas <farosas@suse.de>2024-06-14 14:00:46 -0300
commit3e40bdb15e2ba6e55ee92d148b0cefb7050fad20 (patch)
treea12811db3f562276396180dd9723d51a3b284be2
parent046a64b9801343e2e89eef10c7a48eec8d8c0d4f (diff)
downloadqemu-3e40bdb15e2ba6e55ee92d148b0cefb7050fad20.zip
qemu-3e40bdb15e2ba6e55ee92d148b0cefb7050fad20.tar.gz
qemu-3e40bdb15e2ba6e55ee92d148b0cefb7050fad20.tar.bz2
tests/qtest: Move common define from libqos-spapr.h to new ppc-util.h
The spapr QEMU machine defaults is useful outside libqos, so create a new header for ppc specific qtests and move it there. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
-rw-r--r--tests/qtest/boot-serial-test.c2
-rw-r--r--tests/qtest/libqos/libqos-spapr.h7
-rw-r--r--tests/qtest/ppc-util.h19
-rw-r--r--tests/qtest/prom-env-test.c2
-rw-r--r--tests/qtest/pxe-test.c2
5 files changed, 22 insertions, 10 deletions
diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c
index df389ad..3b92fa5 100644
--- a/tests/qtest/boot-serial-test.c
+++ b/tests/qtest/boot-serial-test.c
@@ -15,7 +15,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/libqos-spapr.h"
+#include "ppc-util.h"
static const uint8_t bios_avr[] = {
0x88, 0xe0, /* ldi r24, 0x08 */
diff --git a/tests/qtest/libqos/libqos-spapr.h b/tests/qtest/libqos/libqos-spapr.h
index e4483c1..a446276 100644
--- a/tests/qtest/libqos/libqos-spapr.h
+++ b/tests/qtest/libqos/libqos-spapr.h
@@ -9,11 +9,4 @@ QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...)
G_GNUC_PRINTF(1, 2);
void qtest_spapr_shutdown(QOSState *qs);
-/* List of capabilities needed to silence warnings with TCG */
-#define PSERIES_DEFAULT_CAPABILITIES \
- "cap-cfpc=broken," \
- "cap-sbbc=broken," \
- "cap-ibs=broken," \
- "cap-ccf-assist=off,"
-
#endif
diff --git a/tests/qtest/ppc-util.h b/tests/qtest/ppc-util.h
new file mode 100644
index 0000000..f68ee93
--- /dev/null
+++ b/tests/qtest/ppc-util.h
@@ -0,0 +1,19 @@
+/*
+ * PowerPC misc useful things
+ *
+ * Copyright (c) 2024, IBM Corporation.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef PPC_UTIL_H
+#define PPC_UTIL_H
+
+/* List of capabilities needed to silence warnings with TCG */
+#define PSERIES_DEFAULT_CAPABILITIES \
+ "cap-cfpc=broken," \
+ "cap-sbbc=broken," \
+ "cap-ibs=broken," \
+ "cap-ccf-assist=off,"
+
+#endif /* PPC_UTIL_H */
diff --git a/tests/qtest/prom-env-test.c b/tests/qtest/prom-env-test.c
index 39ccb59..1470510 100644
--- a/tests/qtest/prom-env-test.c
+++ b/tests/qtest/prom-env-test.c
@@ -21,7 +21,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/libqos-spapr.h"
+#include "ppc-util.h"
#define MAGIC 0xcafec0de
#define ADDRESS 0x4000
diff --git a/tests/qtest/pxe-test.c b/tests/qtest/pxe-test.c
index e4b4822..a3f900f 100644
--- a/tests/qtest/pxe-test.c
+++ b/tests/qtest/pxe-test.c
@@ -16,7 +16,7 @@
#include <glib/gstdio.h>
#include "libqtest.h"
#include "boot-sector.h"
-#include "libqos/libqos-spapr.h"
+#include "ppc-util.h"
#define NETNAME "net0"