All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,
	 Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Cameron Esfahani <dirty@apple.com>,
	 Alexandre Iooss <erdnaxe@crans.org>,
	Yanan Wang <wangyanan55@huawei.com>,
	 Paolo Bonzini <pbonzini@redhat.com>,
	 Eduardo Habkost <eduardo@habkost.net>,
	 Sunil Muthuswamy <sunilmut@microsoft.com>,
	 Richard Henderson <richard.henderson@linaro.org>,
	 Pierrick Bouvier <pierrick.bouvier@linaro.org>,
	 Mahmoud Mandour <ma.mandourr@gmail.com>,
	Reinoud Zandijk <reinoud@netbsd.org>,
	 kvm@vger.kernel.org,  Roman Bolshakov <rbolshakov@ddn.com>
Subject: Re: [PATCH 4/5] plugins: remove special casing for cpu->realized
Date: Mon, 03 Jun 2024 15:19:59 +0100	[thread overview]
Message-ID: <87bk4iglbk.fsf@draig.linaro.org> (raw)
In-Reply-To: <0a76250f-db5b-4c94-941a-cbec1f2e1db6@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Mon, 3 Jun 2024 13:31:07 +0200")

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 30/5/24 21:42, Alex Bennée wrote:
>> Now the condition variable is initialised early on we don't need to go
>> through hoops to avoid calling async_run_on_cpu.
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>   plugins/core.c | 6 +-----
>>   1 file changed, 1 insertion(+), 5 deletions(-)
>> diff --git a/plugins/core.c b/plugins/core.c
>> index 0726bc7f25..badede28cf 100644
>> --- a/plugins/core.c
>> +++ b/plugins/core.c
>> @@ -65,11 +65,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 (DEVICE(cpu)->realized) {
>
> We could assert() this to protect future refactors.

No because the CPU can still not be realized but it will be able to
queue async work.

>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
>> -        async_run_on_cpu(cpu, plugin_cpu_update__async, mask);
>> -    } else {
>> -        plugin_cpu_update__async(cpu, mask);
>> -    }
>> +    async_run_on_cpu(cpu, plugin_cpu_update__async, mask);
>>   }
>>     void plugin_unregister_cb__locked(struct qemu_plugin_ctx *ctx,

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  parent reply	other threads:[~2024-06-03 14:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 19:42 [PATCH 0/5] cpus: a few tweaks to CPU realization Alex Bennée
2024-05-30 19:42 ` [PATCH 1/5] hw/core: expand on the alignment of CPUState Alex Bennée
2024-05-30 22:28   ` Pierrick Bouvier
2024-06-03 11:32   ` Philippe Mathieu-Daudé
2024-05-30 19:42 ` [PATCH 2/5] cpu: move Qemu[Thread|Cond] setup into common code Alex Bennée
2024-05-30 22:29   ` Pierrick Bouvier
2024-05-31 13:46     ` Reinoud Zandijk
2024-06-03 11:28   ` Philippe Mathieu-Daudé
2024-05-30 19:42 ` [PATCH 3/5] cpu-target: don't set cpu->thread_id to bogus value Alex Bennée
2024-05-30 22:29   ` Pierrick Bouvier
2024-06-03 11:29   ` Philippe Mathieu-Daudé
2024-05-30 19:42 ` [PATCH 4/5] plugins: remove special casing for cpu->realized Alex Bennée
2024-05-30 22:30   ` Pierrick Bouvier
2024-06-03 11:31   ` Philippe Mathieu-Daudé
2024-06-03 14:11     ` Philippe Mathieu-Daudé
2024-06-03 14:19     ` Alex Bennée [this message]
2024-05-30 19:42 ` [PATCH 5/5] core/cpu-common: initialise plugin state before thread creation Alex Bennée
2024-05-30 22:31   ` Pierrick Bouvier
2024-05-31  8:59     ` Alex Bennée
2024-05-31  7:26   ` Philippe Mathieu-Daudé
2024-05-31  8:47     ` Alex Bennée
2024-06-03 14:10       ` Philippe Mathieu-Daudé
2024-06-03 12:47 ` [PATCH 0/5] cpus: a few tweaks to CPU realization Philippe Mathieu-Daudé
2024-06-03 14:11   ` 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=87bk4iglbk.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=dirty@apple.com \
    --cc=eduardo@habkost.net \
    --cc=erdnaxe@crans.org \
    --cc=kvm@vger.kernel.org \
    --cc=ma.mandourr@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rbolshakov@ddn.com \
    --cc=reinoud@netbsd.org \
    --cc=richard.henderson@linaro.org \
    --cc=sunilmut@microsoft.com \
    --cc=wangyanan55@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.