[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation |
Date: |
Mon, 6 Jan 2025 21:02:52 +0100 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
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
- [RFC PATCH 0/7] accel: Add per-accelerator vCPUs queue, Philippe Mathieu-Daudé, 2025/01/06
- [RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation,
Philippe Mathieu-Daudé <=
- [RFC PATCH 2/7] cpus: Introduce AccelOpsClass::get_cpus_queue(), Philippe Mathieu-Daudé, 2025/01/06
- [RFC PATCH 3/7] accel/tcg: Implement tcg_get_cpus_queue(), Philippe Mathieu-Daudé, 2025/01/06
- [RFC PATCH 4/7] accel/tcg: Use CPU_FOREACH_TCG(), Philippe Mathieu-Daudé, 2025/01/06
- [RFC PATCH 5/7] accel/hw: Implement hw_accel_get_cpus_queue(), Philippe Mathieu-Daudé, 2025/01/06
- [RFC PATCH 6/7] accel/hvf: Use CPU_FOREACH_HVF(), Philippe Mathieu-Daudé, 2025/01/06
- [RFC PATCH 7/7] accel/kvm: Use CPU_FOREACH_KVM(), Philippe Mathieu-Daudé, 2025/01/06