qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Song Gao" <gaosong@loongson.cn>
Subject: Re: [PATCH v2 02/10] loongarch: reset vcpu after it's created
Date: Wed, 26 Feb 2025 08:10:29 +0100	[thread overview]
Message-ID: <337f97b8-2026-481e-a3aa-a12af05639af@linaro.org> (raw)
In-Reply-To: <20250207162048.1890669-3-imammedo@redhat.com>

On 7/2/25 17:20, Igor Mammedov wrote:
> Reseting vcpu before its thread is created, caused various issues in the past
> for other targets. It doesn't cause issues for loongarch at the moment but
> to be consistent with the rest of targets, move reset during realize time
> after qemu_init_vcpu().
> 
> That basically prevents reset being run when when vCPU is in incositent state

"inconsistent"

> (i.e. accelerator hasn't initialized vCPU yet).
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

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

Cc: qemu-stable@nongnu.org

> ---
> CC: Song Gao <gaosong@loongson.cn>
> ---
>   target/loongarch/cpu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
> index e91f4a5239..15018d43ae 100644
> --- a/target/loongarch/cpu.c
> +++ b/target/loongarch/cpu.c
> @@ -634,8 +634,8 @@ static void loongarch_cpu_realizefn(DeviceState *dev, Error **errp)
>   
>       loongarch_cpu_register_gdb_regs_for_features(cs);
>   
> -    cpu_reset(cs);
>       qemu_init_vcpu(cs);
> +    cpu_reset(cs);
>   
>       lacc->parent_realize(dev, errp);
>   }



  parent reply	other threads:[~2025-02-26  7:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 16:20 [PATCH v2 00/10] accel: Only include qdev-realized vCPUs in global &cpus_queue Igor Mammedov
2025-02-07 16:20 ` [PATCH v2 01/10] bsd-user: drop not longer used target_reset_cpu() Igor Mammedov
2025-02-25 11:27   ` Alex Bennée
2025-03-02  5:11   ` Warner Losh
2025-02-07 16:20 ` [PATCH v2 02/10] loongarch: reset vcpu after it's created Igor Mammedov
2025-02-25  7:50   ` bibo mao
2025-02-26  7:10   ` Philippe Mathieu-Daudé [this message]
2025-02-07 16:20 ` [PATCH v2 03/10] m68k: " Igor Mammedov
2025-02-25 11:27   ` Alex Bennée
2025-02-26  7:12   ` Philippe Mathieu-Daudé
2025-02-07 16:20 ` [PATCH v2 04/10] tcg:tlb: use tcg_debug_assert() in assert_cpu_is_self() Igor Mammedov
2025-02-25 11:47   ` Alex Bennée
2025-02-07 16:20 ` [PATCH v2 05/10] Revert "tcg/cputlb: remove other-cpu capability from TLB flushing" Igor Mammedov
2025-02-25 12:42   ` Alex Bennée
2025-02-25 17:19     ` Igor Mammedov
2025-02-25 17:26       ` Igor Mammedov
2025-02-07 16:20 ` [PATCH v2 06/10] tcg: drop cpu->created check Igor Mammedov
2025-02-07 16:20 ` [PATCH v2 07/10] accel/tcg: Simplify use of &first_cpu in rr_cpu_thread_fn() Igor Mammedov
2025-02-25 12:44   ` Alex Bennée
2025-02-07 16:20 ` [PATCH v2 08/10] cpus: expose only realized vCPUs to global &cpus_queue Igor Mammedov
2025-02-26  7:16   ` Philippe Mathieu-Daudé
2025-03-03 13:09     ` Igor Mammedov
2025-03-03 14:34       ` Philippe Mathieu-Daudé
2025-02-07 16:20 ` [PATCH v2 09/10] accel/kvm: Assert vCPU is created when calling kvm_dirty_ring_reap*() Igor Mammedov
2025-02-07 16:20 ` [PATCH v2 10/10] accel/kvm: Remove unreachable assertion in kvm_dirty_ring_reap*() Igor Mammedov
2025-02-25 10:31 ` [PATCH v2 00/10] accel: Only include qdev-realized vCPUs in global &cpus_queue Igor Mammedov

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=337f97b8-2026-481e-a3aa-a12af05639af@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=gaosong@loongson.cn \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.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).