qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Zhao Liu" <zhao1.liu@intel.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony PERARD" <anthony@xenproject.org>,
	"Paul Durrant" <paul@xen.org>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	xen-devel@lists.xenproject.org
Subject: [PATCH v6 26/39] accel/dummy: Extract 'dummy-cpus.h' header from 'system/cpus.h'
Date: Thu,  3 Jul 2025 19:32:32 +0200	[thread overview]
Message-ID: <20250703173248.44995-27-philmd@linaro.org> (raw)
In-Reply-To: <20250703173248.44995-1-philmd@linaro.org>

'dummy' helpers are specific to accelerator implementations,
no need to expose them via "system/cpus.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
 MAINTAINERS           |  1 +
 accel/dummy-cpus.h    | 14 ++++++++++++++
 include/system/cpus.h |  5 -----
 accel/dummy-cpus.c    |  1 +
 accel/qtest/qtest.c   |  1 +
 accel/xen/xen-all.c   |  1 +
 6 files changed, 18 insertions(+), 5 deletions(-)
 create mode 100644 accel/dummy-cpus.h

diff --git a/MAINTAINERS b/MAINTAINERS
index b1cbfe115bc..37d02b2313c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -503,6 +503,7 @@ F: include/system/accel-*.h
 F: include/system/cpus.h
 F: include/accel/accel-cpu*.h
 F: accel/accel-*.?
+F: accel/dummy-cpus.?
 F: accel/Makefile.objs
 F: accel/stubs/Makefile.objs
 F: cpu-common.c
diff --git a/accel/dummy-cpus.h b/accel/dummy-cpus.h
new file mode 100644
index 00000000000..d18dd0fdc51
--- /dev/null
+++ b/accel/dummy-cpus.h
@@ -0,0 +1,14 @@
+/*
+ * Dummy cpu thread code
+ *
+ * Copyright IBM, Corp. 2011
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef ACCEL_DUMMY_CPUS_H
+#define ACCEL_DUMMY_CPUS_H
+
+void dummy_start_vcpu_thread(CPUState *cpu);
+
+#endif
diff --git a/include/system/cpus.h b/include/system/cpus.h
index 3226c765d01..69be6a77a75 100644
--- a/include/system/cpus.h
+++ b/include/system/cpus.h
@@ -7,11 +7,6 @@ void cpus_register_accel(const AccelOpsClass *i);
 /* return registers ops */
 const AccelOpsClass *cpus_get_accel(void);
 
-/* accel/dummy-cpus.c */
-
-/* Create a dummy vcpu for AccelOpsClass->create_vcpu_thread */
-void dummy_start_vcpu_thread(CPUState *);
-
 /* interface available for cpus accelerator threads */
 
 /* For temporary buffers for forming a name */
diff --git a/accel/dummy-cpus.c b/accel/dummy-cpus.c
index 867276144fa..03cfc0fa01e 100644
--- a/accel/dummy-cpus.c
+++ b/accel/dummy-cpus.c
@@ -17,6 +17,7 @@
 #include "qemu/guest-random.h"
 #include "qemu/main-loop.h"
 #include "hw/core/cpu.h"
+#include "accel/dummy-cpus.h"
 
 static void *dummy_cpu_thread_fn(void *arg)
 {
diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c
index 92bed9264ce..612cede160b 100644
--- a/accel/qtest/qtest.c
+++ b/accel/qtest/qtest.c
@@ -24,6 +24,7 @@
 #include "qemu/guest-random.h"
 #include "qemu/main-loop.h"
 #include "hw/core/cpu.h"
+#include "accel/dummy-cpus.h"
 
 static int64_t qtest_clock_counter;
 
diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
index de52a8f882a..c150dd43cab 100644
--- a/accel/xen/xen-all.c
+++ b/accel/xen/xen-all.c
@@ -18,6 +18,7 @@
 #include "hw/xen/xen_igd.h"
 #include "chardev/char.h"
 #include "qemu/accel.h"
+#include "accel/dummy-cpus.h"
 #include "system/accel-ops.h"
 #include "system/cpus.h"
 #include "system/xen.h"
-- 
2.49.0



  parent reply	other threads:[~2025-07-03 17:42 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03 17:32 [PATCH v6 00/39] accel: Preparatory cleanups for split-accel Philippe Mathieu-Daudé
2025-07-03 17:32 ` [PATCH v6 01/39] hw/core/machine: Display CPU model name in 'info cpus' command Philippe Mathieu-Daudé
2025-07-04  3:10   ` Xiaoyao Li
2025-07-04  4:59   ` Markus Armbruster
2025-07-15  8:48     ` Philippe Mathieu-Daudé
2025-07-03 17:32 ` [PATCH v6 02/39] system/memory: Restrict eventfd dispatch_write() to emulators Philippe Mathieu-Daudé
2025-07-04  3:32   ` Xiaoyao Li
2025-07-04 11:34     ` Alex Bennée
2025-07-03 17:32 ` [PATCH v6 03/39] system/runstate: Document qemu_add_vm_change_state_handler() Philippe Mathieu-Daudé
2025-07-04  3:40   ` Xiaoyao Li
2025-07-15  9:02     ` Alex Bennée
2025-07-15  9:34       ` Xiaoyao Li
2025-07-04  9:31   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 04/39] system/cpus: Assert interrupt handling is done with BQL locked Philippe Mathieu-Daudé
2025-07-04  4:07   ` Xiaoyao Li
2025-07-04  9:32   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 05/39] accel/kvm: Remove kvm_init_cpu_signals() stub Philippe Mathieu-Daudé
2025-07-04  4:13   ` Xiaoyao Li
2025-07-04  8:24     ` Philippe Mathieu-Daudé
2025-07-04 11:49   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 06/39] accel/kvm: Reduce kvm_create_vcpu() declaration scope Philippe Mathieu-Daudé
2025-07-04  4:15   ` Xiaoyao Li
2025-07-04  9:33   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 07/39] accel/tcg: Remove 'info opcount' and @x-query-opcount Philippe Mathieu-Daudé
2025-07-04  4:23   ` Xiaoyao Li
2025-07-04  4:50   ` Markus Armbruster
2025-07-04  9:36   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 08/39] accel/tcg: Remove profiler leftover Philippe Mathieu-Daudé
2025-07-04  4:24   ` Xiaoyao Li
2025-07-04  9:37   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 09/39] accel/tcg: Factor tcg_dump_flush_info() out Philippe Mathieu-Daudé
2025-07-04  4:27   ` Xiaoyao Li
2025-07-04  4:33     ` Xiaoyao Li
2025-07-04  9:38   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 10/39] accel/tcg: Factor tcg_dump_stats() out for re-use Philippe Mathieu-Daudé
2025-07-04  9:39   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 11/39] accel/tcg: Extract statistic related code to tcg-stats.c Philippe Mathieu-Daudé
2025-07-04  8:44   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 12/39] accel: Move supports_guest_debug() declaration to AccelClass Philippe Mathieu-Daudé
2025-07-04  5:25   ` Xiaoyao Li
2025-07-04  9:42   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 13/39] accel: Move cpus_are_resettable() " Philippe Mathieu-Daudé
2025-07-04  5:36   ` Xiaoyao Li
2025-07-04  9:44   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 14/39] accel/hvf: Restrict internal declarations Philippe Mathieu-Daudé
2025-07-04  5:39   ` Xiaoyao Li
2025-07-04  9:45   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 15/39] accel/hvf: Move per-cpu method declarations to hvf-accel-ops.c Philippe Mathieu-Daudé
2025-07-04  9:46   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 16/39] accel/hvf: Move generic method declarations to hvf-all.c Philippe Mathieu-Daudé
2025-07-04  9:50   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 17/39] cpus: Document CPUState::vcpu_dirty field Philippe Mathieu-Daudé
2025-07-04  5:52   ` Xiaoyao Li
2025-07-03 17:32 ` [PATCH v6 18/39] accel/hvf: Replace @dirty field by generic " Philippe Mathieu-Daudé
2025-07-04  5:54   ` Xiaoyao Li
2025-07-04 10:07   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 19/39] accel/nvmm: " Philippe Mathieu-Daudé
2025-07-04  5:55   ` Xiaoyao Li
2025-07-04 10:08   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 20/39] accel/whpx: " Philippe Mathieu-Daudé
2025-07-04  5:55   ` Xiaoyao Li
2025-07-04 10:11   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 21/39] accel/kvm: Remove kvm_cpu_synchronize_state() stub Philippe Mathieu-Daudé
2025-07-04  6:02   ` Xiaoyao Li
2025-07-04  8:21     ` Philippe Mathieu-Daudé
2025-07-04 10:15   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 22/39] accel/system: Document cpu_synchronize_state() Philippe Mathieu-Daudé
2025-07-04 10:17   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 23/39] accel/system: Document cpu_synchronize_state_post_init/reset() Philippe Mathieu-Daudé
2025-07-04 10:19   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 24/39] accel/nvmm: Expose nvmm_enabled() to common code Philippe Mathieu-Daudé
2025-07-04  8:32   ` Philippe Mathieu-Daudé
2025-07-04 10:26   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 25/39] accel/whpx: Expose whpx_enabled() " Philippe Mathieu-Daudé
2025-07-04 10:36   ` Zhao Liu
2025-07-03 17:32 ` Philippe Mathieu-Daudé [this message]
2025-07-04  6:16   ` [PATCH v6 26/39] accel/dummy: Extract 'dummy-cpus.h' header from 'system/cpus.h' Xiaoyao Li
2025-07-04 10:44   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 27/39] accel: Pass old/new interrupt mask to handle_interrupt() handler Philippe Mathieu-Daudé
2025-07-04  6:32   ` Xiaoyao Li
2025-07-04 10:59   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 28/39] accel: Expose and register generic_handle_interrupt() Philippe Mathieu-Daudé
2025-07-04  6:38   ` Xiaoyao Li
2025-07-04  8:27     ` Philippe Mathieu-Daudé
2025-07-03 17:32 ` [PATCH v6 29/39] accel: Keep reference to AccelOpsClass in AccelClass Philippe Mathieu-Daudé
2025-07-04 11:01   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 30/39] accel: Propagate AccelState to AccelClass::init_machine() Philippe Mathieu-Daudé
2025-07-04 11:33   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 31/39] accel/kvm: Prefer local AccelState over global MachineState::accel Philippe Mathieu-Daudé
2025-07-04 11:33   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 32/39] accel/tcg: Prefer local AccelState over global current_accel() Philippe Mathieu-Daudé
2025-07-04 11:34   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 33/39] accel: Directly pass AccelState argument to AccelClass::has_memory() Philippe Mathieu-Daudé
2025-07-04 11:35   ` Zhao Liu
2025-07-04 11:46   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 34/39] accel/kvm: Directly pass KVMState argument to do_kvm_create_vm() Philippe Mathieu-Daudé
2025-07-04 11:37   ` Zhao Liu
2025-07-04 11:46   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 35/39] accel: Remove unused MachineState argument of AccelClass::setup_post() Philippe Mathieu-Daudé
2025-07-04 11:38   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 36/39] accel: Pass AccelState argument to gdbstub_supported_sstep_flags() Philippe Mathieu-Daudé
2025-07-04 11:42   ` Zhao Liu
2025-07-03 17:32 ` [PATCH v6 37/39] accel: Rename 'system/accel-ops.h' -> 'accel/accel-cpu-ops.h' Philippe Mathieu-Daudé
2025-07-04  8:52   ` Zhao Liu
2025-07-04 14:01   ` Richard Henderson
2025-07-03 17:32 ` [PATCH v6 38/39] accel: Extract AccelClass definition to 'accel/accel-ops.h' Philippe Mathieu-Daudé
2025-07-04  9:02   ` Zhao Liu
2025-07-04 14:03   ` Richard Henderson
2025-07-03 17:32 ` [PATCH v6 39/39] MAINTAINERS: Add me as reviewer of overall accelerators section Philippe Mathieu-Daudé
2025-07-03 22:42   ` Philippe Mathieu-Daudé
2025-07-04  3:23   ` Richard Henderson
2025-07-04  8:50 ` [PATCH v6 00/39] accel: Preparatory cleanups for split-accel Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250703173248.44995-27-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=anthony@xenproject.org \
    --cc=edgar.iglesias@gmail.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).