aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-23 18:17:15 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-04-25 17:09:58 +0200
commit64cbcf1d9782c340cf59868a1be97f0054c4ec44 (patch)
tree239ea5f03860a0eeb3ac784389c09eeaefcfd8ea
parent2492008d0de0380ee910730dc10159a8e29b13a9 (diff)
downloadqemu-64cbcf1d9782c340cf59868a1be97f0054c4ec44.zip
qemu-64cbcf1d9782c340cf59868a1be97f0054c4ec44.tar.gz
qemu-64cbcf1d9782c340cf59868a1be97f0054c4ec44.tar.bz2
accel: Implement accel_init_ops_interfaces() for both system/user mode
We want to build more common code, moving objects from meson's specific_ss[] set to common_ss[]. Since the CONFIG_USER_ONLY definitions isn't applied on the common_ss[] set, it is simpler to add an empty accel_init_ops_interfaces() stub on user emulation, removing any CONFIG_USER_ONLY use in accel-target.c. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250417165430.58213-5-philmd@linaro.org>
-rw-r--r--MAINTAINERS2
-rw-r--r--accel/accel-internal.h (renamed from accel/accel-system.h)8
-rw-r--r--accel/accel-system.c4
-rw-r--r--accel/accel-target.c10
-rw-r--r--accel/accel-user.c6
5 files changed, 15 insertions, 15 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 28b1e9b..07711cf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -500,7 +500,7 @@ F: include/qemu/target-info*.h
F: include/system/accel-*.h
F: include/system/cpus.h
F: include/accel/accel-cpu-target.h
-F: accel/accel-*.c
+F: accel/accel-*.?
F: accel/Makefile.objs
F: accel/stubs/Makefile.objs
F: cpu-common.c
diff --git a/accel/accel-system.h b/accel/accel-internal.h
index 2d37c73..03426aa 100644
--- a/accel/accel-system.h
+++ b/accel/accel-internal.h
@@ -1,5 +1,5 @@
/*
- * QEMU System Emulation accel internal functions
+ * QEMU accel internal functions
*
* Copyright 2021 SUSE LLC
*
@@ -7,9 +7,9 @@
* See the COPYING file in the top-level directory.
*/
-#ifndef ACCEL_SYSTEM_H
-#define ACCEL_SYSTEM_H
+#ifndef ACCEL_INTERNAL_H
+#define ACCEL_INTERNAL_H
-void accel_system_init_ops_interfaces(AccelClass *ac);
+void accel_init_ops_interfaces(AccelClass *ac);
#endif /* ACCEL_SYSTEM_H */
diff --git a/accel/accel-system.c b/accel/accel-system.c
index 5df49fb..a0f562a 100644
--- a/accel/accel-system.c
+++ b/accel/accel-system.c
@@ -29,7 +29,7 @@
#include "system/accel-ops.h"
#include "system/cpus.h"
#include "qemu/error-report.h"
-#include "accel-system.h"
+#include "accel-internal.h"
int accel_init_machine(AccelState *accel, MachineState *ms)
{
@@ -63,7 +63,7 @@ void accel_setup_post(MachineState *ms)
}
/* initialize the arch-independent accel operation interfaces */
-void accel_system_init_ops_interfaces(AccelClass *ac)
+void accel_init_ops_interfaces(AccelClass *ac)
{
const char *ac_name;
char *ops_name;
diff --git a/accel/accel-target.c b/accel/accel-target.c
index 08d4e45..7f3bbf3 100644
--- a/accel/accel-target.c
+++ b/accel/accel-target.c
@@ -29,10 +29,7 @@
#include "cpu.h"
#include "accel/accel-cpu-target.h"
-
-#ifndef CONFIG_USER_ONLY
-#include "accel-system.h"
-#endif /* !CONFIG_USER_ONLY */
+#include "accel-internal.h"
static const TypeInfo accel_type = {
.name = TYPE_ACCEL,
@@ -106,10 +103,7 @@ static void accel_init_cpu_interfaces(AccelClass *ac)
void accel_init_interfaces(AccelClass *ac)
{
-#ifndef CONFIG_USER_ONLY
- accel_system_init_ops_interfaces(ac);
-#endif /* !CONFIG_USER_ONLY */
-
+ accel_init_ops_interfaces(ac);
accel_init_cpu_interfaces(ac);
}
diff --git a/accel/accel-user.c b/accel/accel-user.c
index 22b6a1a..7d19230 100644
--- a/accel/accel-user.c
+++ b/accel/accel-user.c
@@ -9,6 +9,12 @@
#include "qemu/osdep.h"
#include "qemu/accel.h"
+#include "accel-internal.h"
+
+void accel_init_ops_interfaces(AccelClass *ac)
+{
+ /* nothing */
+}
AccelState *current_accel(void)
{