From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkum0-0002rh-Um for qemu-devel@nongnu.org; Thu, 15 May 2014 08:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wkulq-00030z-Jh for qemu-devel@nongnu.org; Thu, 15 May 2014 08:28:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkulq-00030L-CJ for qemu-devel@nongnu.org; Thu, 15 May 2014 08:28:22 -0400 Date: Thu, 15 May 2014 14:28:18 +0200 From: Igor Mammedov Message-ID: <20140515142818.1e92848b@nial.usersys.redhat.com> In-Reply-To: <1398889773-14652-2-git-send-email-ehabkost@redhat.com> References: <1398889773-14652-1-git-send-email-ehabkost@redhat.com> <1398889773-14652-2-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 1/5] cpu: Initialize cpu->stopped=true earlier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: libvir-list@redhat.com, Jiri Denemark , Peter Krempa , qemu-devel@nongnu.org, Andreas =?ISO-8859-1?B?RuRyYmVy?= On Wed, 30 Apr 2014 17:29:29 -0300 Eduardo Habkost wrote: > In case something happens and prevents qemu_init_vcpu() from running > after cpu_exec_init() was already called, this will let the rest of the > VCPU handling code know that the CPU is not running yet. perhaps default value should be set even earlier in qom/cpu.c:cpu_common_initfn() > > Signed-off-by: Eduardo Habkost > --- > cpus.c | 1 - > exec.c | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/cpus.c b/cpus.c > index 7bbe153..69b0530 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -1184,7 +1184,6 @@ void qemu_init_vcpu(CPUState *cpu) > { > cpu->nr_cores = smp_cores; > cpu->nr_threads = smp_threads; > - cpu->stopped = true; > if (kvm_enabled()) { > qemu_kvm_start_vcpu(cpu); > } else if (tcg_enabled()) { > diff --git a/exec.c b/exec.c > index 91513c6..e91decc 100644 > --- a/exec.c > +++ b/exec.c > @@ -485,6 +485,7 @@ void cpu_exec_init(CPUArchState *env) > } > cpu->cpu_index = cpu_index; > cpu->numa_node = 0; > + cpu->stopped = true; > QTAILQ_INIT(&cpu->breakpoints); > QTAILQ_INIT(&cpu->watchpoints); > #ifndef CONFIG_USER_ONLY