[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/12] plugins: Check if vCPU is realized
From: |
Akihiko Odaki |
Subject: |
[PATCH v3 03/12] plugins: Check if vCPU is realized |
Date: |
Wed, 13 Sep 2023 07:40:52 +0900 |
The created member of CPUState tells if the vCPU thread is started, and
will be always false for the user space emulation that manages threads
independently. Use the realized member of DeviceState, which is valid
for both of the system and user space emulation.
Fixes: 54cb65d858 ("plugin: add core code")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
plugins/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/core.c b/plugins/core.c
index 3c4e26c7ed..fcd33a2bff 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -64,7 +64,7 @@ static void plugin_cpu_update__locked(gpointer k, gpointer v,
gpointer udata)
CPUState *cpu = container_of(k, CPUState, cpu_index);
run_on_cpu_data mask = RUN_ON_CPU_HOST_ULONG(*plugin.mask);
- if (cpu->created) {
+ if (DEVICE(cpu)->realized) {
async_run_on_cpu(cpu, plugin_cpu_update__async, mask);
} else {
plugin_cpu_update__async(cpu, mask);
--
2.42.0
- [PATCH v3 00/12] gdbstub and TCG plugin improvements, Akihiko Odaki, 2023/09/12
- [PATCH v3 01/12] gdbstub: Fix target_xml initialization, Akihiko Odaki, 2023/09/12
- [PATCH v3 02/12] gdbstub: Fix target.xml response, Akihiko Odaki, 2023/09/12
- [PATCH v3 03/12] plugins: Check if vCPU is realized,
Akihiko Odaki <=
- [PATCH v3 04/12] contrib/plugins: Use GRWLock in execlog, Akihiko Odaki, 2023/09/12
- [PATCH v3 05/12] gdbstub: Introduce GDBFeature structure, Akihiko Odaki, 2023/09/12
- [PATCH v3 06/12] target/arm: Move the reference to arm-core.xml, Akihiko Odaki, 2023/09/12
- [PATCH v3 07/12] hw/core/cpu: Return static value with gdb_arch_name(), Akihiko Odaki, 2023/09/12
- [PATCH v3 08/12] gdbstub: Use g_markup_printf_escaped(), Akihiko Odaki, 2023/09/12
- [PATCH v3 09/12] target/arm: Remove references to gdb_has_xml, Akihiko Odaki, 2023/09/12
- [PATCH v3 10/12] target/ppc: Remove references to gdb_has_xml, Akihiko Odaki, 2023/09/12
- [PATCH v3 11/12] gdbstub: Remove gdb_has_xml variable, Akihiko Odaki, 2023/09/12