qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: "Jan Kiszka" <jan.kiszka@siemens.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	陳韋任 <chenwj@iis.sinica.edu.tw>
Subject: Re: [Qemu-devel] pause_all_vcpus() TCG bug?
Date: Wed, 1 May 2013 14:47:52 +0100	[thread overview]
Message-ID: <CAFEAcA_NtSre2wA6hu+RGPLBq-HRreE9EcT-AyOGz_ddbspC6A@mail.gmail.com> (raw)
In-Reply-To: <51811995.1010409@suse.de>

On 1 May 2013 14:33, Andreas Färber <afaerber@suse.de> wrote:
> Hello,
>
> This is today's function, with annotations and question inline:
>
> void pause_all_vcpus(void)
> {
>     CPUArchState *penv = first_cpu;
>
>     qemu_clock_enable(vm_clock, false);
>     while (penv) {
>         CPUState *pcpu = ENV_GET_CPU(penv);
>         pcpu->stop = true;
>         qemu_cpu_kick(pcpu);
>         penv = penv->next_cpu;
>     }
>
> /* So, at this point penv == NULL. */
>
>     if (qemu_in_vcpu_thread()) {
>         cpu_stop_current();
>         if (!kvm_enabled()) {
>             while (penv) {
>
> /* Looks like this can never be true then? */
> /* Is penv = first_cpu; missing? */
>
>                 CPUState *pcpu = ENV_GET_CPU(penv);
>                 pcpu->stop = 0;
>
> /* 0 instead of false may hint at a mismerge... */
>
>                 pcpu->stopped = true;
>                 penv = penv->next_cpu;
>             }
>             return;
>         }
>     }

This certainly looks odd. This bug seems to have
been present since this patch was first committed
(d798e9745, January last year, by Jan.)

-- PMM

  reply	other threads:[~2013-05-01 13:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 13:33 [Qemu-devel] pause_all_vcpus() TCG bug? Andreas Färber
2013-05-01 13:47 ` Peter Maydell [this message]
2013-05-02  8:44   ` Jan Kiszka

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=CAFEAcA_NtSre2wA6hu+RGPLBq-HRreE9EcT-AyOGz_ddbspC6A@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=chenwj@iis.sinica.edu.tw \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.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).