tests/qtest: Move common define from libqos-spapr.h to new ppc-util.h
authorNicholas Piggin <npiggin@gmail.com>
Thu, 30 May 2024 07:44:49 +0000 (17:44 +1000)
committerFabiano Rosas <farosas@suse.de>
Fri, 14 Jun 2024 17:00:46 +0000 (14:00 -0300)
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>
tests/qtest/boot-serial-test.c
tests/qtest/libqos/libqos-spapr.h
tests/qtest/ppc-util.h [new file with mode: 0644]
tests/qtest/prom-env-test.c
tests/qtest/pxe-test.c

index df389adeeb184c7e3ebd187e3416abb8ec1db0b8..3b92fa5d506ea42993e40edf60293a066c7a14aa 100644 (file)
@@ -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   */
index e4483c14f80142b20bce29bbf6c43de289d81629..a446276416c81201bdc37df0632ab23662deac17 100644 (file)
@@ -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 (file)
index 0000000..f68ee93
--- /dev/null
@@ -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 */
index 39ccb59797df508e09ed240fd9dd55ad561a7ac3..14705105ad8eb9476b5f77f47a79c563e7ec310e 100644 (file)
@@ -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
index e4b48225a5a8748d41f428595a08b2e717ee012b..a3f900fbea322d4d9dc31471a28d9c284cac4ed0 100644 (file)
@@ -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"