]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
accel: Implement accel_init_ops_interfaces() for both system/user mode
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 23 Mar 2025 17:17:15 +0000 (18:17 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 25 Apr 2025 15:09:58 +0000 (17:09 +0200)
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>

MAINTAINERS
accel/accel-internal.h [moved from accel/accel-system.h with 56% similarity]
accel/accel-system.c
accel/accel-target.c
accel/accel-user.c

index 28b1e9ba443b976e01db43773dce35a2b1fc4a6f..07711cfd3810c02dfe36446802d04e97de797be8 100644 (file)
@@ -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
similarity index 56%
rename from accel/accel-system.h
rename to accel/accel-internal.h
index 2d37c73c97b58698a7ac68f3b04a95db69cde7d5..03426aa21ee60867b8433fe0bc8cda1b2203de4c 100644 (file)
@@ -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 */
index 5df49fbe831d267c447c6421b9e1479e6777ee64..a0f562ae9ff2ff17b170e3012345ee66a835c9e3 100644 (file)
@@ -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;
index 08d4e450bde64c173009cd58dc407b7e5ad09f88..7f3bbf31a8ba9b070b4a6c6bca0ac9eb44805c46 100644 (file)
 
 #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);
 }
 
index 22b6a1a1a89fea5a3d79f9bbc774235ff3d978d8..7d192306a6585ce6e402c78bc03fa27f23b73c09 100644 (file)
@@ -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)
 {