From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Mikhail Tyutin" <m.tyutin@yadro.com>,
"Aleksandr Anenkov" <a.anenkov@yadro.com>,
qemu-devel@nongnu.org, "Alexandre Iooss" <erdnaxe@crans.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH v3 03/12] plugins: Check if vCPU is realized
Date: Wed, 13 Sep 2023 08:17:09 +0200 [thread overview]
Message-ID: <bf33447c-119f-c4b9-5f80-d4ad6169c708@linaro.org> (raw)
In-Reply-To: <20230912224107.29669-4-akihiko.odaki@daynix.com>
On 13/9/23 00:40, Akihiko Odaki wrote:
> 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.
Per the docstring:
/**
* CPUState:
* @created: Indicates whether the CPU thread has been
* successfully created.
Each CPU DeviceClass's DeviceRealize() handler which calls
qemu_init_vcpu(). Ah, what we miss is:
-- >8 --
--- a/accel/tcg/user-exec-stub.c
+++ b/accel/tcg/user-exec-stub.c
@@ -14,6 +14,7 @@ void cpu_remove_sync(CPUState *cpu)
void qemu_init_vcpu(CPUState *cpu)
{
+ cpu->created = true;
}
---
Missed in commit c7f0f3b1c8 ("qtest: add test framework").
Does that help?
> 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);
next prev parent reply other threads:[~2023-09-13 6:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 22:40 [PATCH v3 00/12] gdbstub and TCG plugin improvements Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 01/12] gdbstub: Fix target_xml initialization Akihiko Odaki
2023-09-14 12:29 ` Philippe Mathieu-Daudé
2023-09-12 22:40 ` [PATCH v3 02/12] gdbstub: Fix target.xml response Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 03/12] plugins: Check if vCPU is realized Akihiko Odaki
2023-09-13 6:17 ` Philippe Mathieu-Daudé [this message]
2023-09-14 17:16 ` Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 04/12] contrib/plugins: Use GRWLock in execlog Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 05/12] gdbstub: Introduce GDBFeature structure Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 06/12] target/arm: Move the reference to arm-core.xml Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 07/12] hw/core/cpu: Return static value with gdb_arch_name() Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 08/12] gdbstub: Use g_markup_printf_escaped() Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 09/12] target/arm: Remove references to gdb_has_xml Akihiko Odaki
2023-09-12 22:40 ` [PATCH v3 10/12] target/ppc: " Akihiko Odaki
2023-09-12 22:41 ` [PATCH v3 11/12] gdbstub: Remove gdb_has_xml variable Akihiko Odaki
2023-09-12 22:41 ` [PATCH v3 12/12] gdbstub: Replace gdb_regs with an array Akihiko Odaki
2023-09-14 15:56 ` [PATCH v3 00/12] gdbstub and TCG plugin improvements Alex Bennée
2023-09-14 17:18 ` 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=bf33447c-119f-c4b9-5f80-d4ad6169c708@linaro.org \
--to=philmd@linaro.org \
--cc=a.anenkov@yadro.com \
--cc=akihiko.odaki@daynix.com \
--cc=alex.bennee@linaro.org \
--cc=erdnaxe@crans.org \
--cc=m.tyutin@yadro.com \
--cc=ma.mandourr@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).