[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] pause_all_vcpus() TCG bug?
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] pause_all_vcpus() TCG bug? |
Date: |
Wed, 1 May 2013 14:47:52 +0100 |
On 1 May 2013 14:33, Andreas Färber <address@hidden> 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