[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation
- To: qemu-devel@xxxxxxxxxx
- From: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
- Date: Mon, 6 Jan 2025 21:02:52 +0100
- Cc: Daniel Henrique Barboza <dbarboza@xxxxxxxxxxxxxxxx>, Frédéric Barrat <fbarrat@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Ilya Leoshkevich <iii@xxxxxxxxxxxxx>, Cameron Esfahani <dirty@xxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx, Alexander Graf <agraf@xxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, Halil Pasic <pasic@xxxxxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, qemu-arm@xxxxxxxxxx, Cédric Le Goater <clg@xxxxxxxxxx>, Yanan Wang <wangyanan55@xxxxxxxxxx>, Reinoud Zandijk <reinoud@xxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, qemu-s390x@xxxxxxxxxx, Riku Voipio <riku.voipio@xxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Sunil Muthuswamy <sunilmut@xxxxxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Marcelo Tosatti <mtosatti@xxxxxxxxxx>, Thomas Huth <thuth@xxxxxxxxxx>, Roman Bolshakov <rbolshakov@xxxxxxx>, "Edgar E . Iglesias" <edgar.iglesias@xxxxxxx>, Zhao Liu <zhao1.liu@xxxxxxxxx>, Phil Dennis-Jordan <phil@xxxxxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Harsh Prateek Bora <harshpb@xxxxxxxxxxxxx>, Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>, "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, qemu-ppc@xxxxxxxxxx, Daniel Henrique Barboza <danielhb413@xxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Anton Johansson <anjo@xxxxxx>
- Delivery-date: Mon, 06 Jan 2025 20:03:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
---
include/hw/core/cpu.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index c3ca0babcb3..48d90f50a71 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -594,8 +594,11 @@ extern CPUTailQ cpus_queue;
#define first_cpu QTAILQ_FIRST_RCU(&cpus_queue)
#define CPU_NEXT(cpu) QTAILQ_NEXT_RCU(cpu, node)
#define CPU_FOREACH(cpu) QTAILQ_FOREACH_RCU(cpu, &cpus_queue, node)
+
+#if defined(CONFIG_USER_ONLY)
#define CPU_FOREACH_SAFE(cpu, next_cpu) \
QTAILQ_FOREACH_SAFE_RCU(cpu, &cpus_queue, node, next_cpu)
+#endif
extern __thread CPUState *current_cpu;
--
2.47.1
|