[PATCH v2 1/3] softmmu: Use cpu->created in tcg_commit

Richard Henderson posted 3 patches 11 months, 4 weeks ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
[PATCH v2 1/3] softmmu: Use cpu->created in tcg_commit
Posted by Richard Henderson 11 months, 4 weeks ago
Use created not halt_cond to test for cpu created.

Fixes: 0d58c660689f ("softmmu: Use async_run_on_cpu in tcg_commit")
Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 softmmu/physmem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 18277ddd67..88fafec1da 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -2515,9 +2515,9 @@ static void tcg_commit(MemoryListener *listener)
      * the memory data structures.
      *
      * That said, the listener is also called during realize, before
-     * all of the tcg machinery for run-on is initialized: thus halt_cond.
+     * all of the tcg machinery for run-on is initialized: thus created.
      */
-    if (cpu->halt_cond) {
+    if (cpu->created) {
         async_run_on_cpu(cpu, tcg_commit_cpu, RUN_ON_CPU_HOST_PTR(cpuas));
     } else {
         tcg_commit_cpu(cpu, RUN_ON_CPU_HOST_PTR(cpuas));
-- 
2.34.1


Re: [PATCH v2 1/3] softmmu: Use cpu->created in tcg_commit
Posted by Philippe Mathieu-Daudé 11 months, 4 weeks ago
On 15/9/23 18:32, Richard Henderson wrote:
> Use created not halt_cond to test for cpu created.
> 
> Fixes: 0d58c660689f ("softmmu: Use async_run_on_cpu in tcg_commit")
> Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   softmmu/physmem.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

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