From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1jJv-0007uJ-Lo for qemu-devel@nongnu.org; Wed, 06 May 2009 11:46:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1jJr-0007te-Uu for qemu-devel@nongnu.org; Wed, 06 May 2009 11:46:07 -0400 Received: from [199.232.76.173] (port=51442 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1jJr-0007ta-NQ for qemu-devel@nongnu.org; Wed, 06 May 2009 11:46:03 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:17566) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1jJr-0004C9-3X for qemu-devel@nongnu.org; Wed, 06 May 2009 11:46:03 -0400 Message-ID: <4A01B0B5.1030105@siemens.com> Date: Wed, 06 May 2009 17:45:57 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1241621382-21577-1-git-send-email-glommer@redhat.com> <1241621382-21577-2-git-send-email-glommer@redhat.com> <1241621382-21577-3-git-send-email-glommer@redhat.com> <1241621382-21577-4-git-send-email-glommer@redhat.com> In-Reply-To: <1241621382-21577-4-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 3/4] move halted state setting to inside of cpu_x86_init List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Glauber Costa wrote: > cpus other than the first one starting at the halted state > is a safe assumption to anyone. Move it to where it belongs. > > Signed-off-by: Glauber Costa > --- > hw/pc.c | 2 -- > target-i386/helper.c | 3 +++ > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/hw/pc.c b/hw/pc.c > index b726c17..06d1fca 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -849,8 +849,6 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, > fprintf(stderr, "Unable to find x86 CPU definition\n"); > exit(1); > } > - if (i != 0) > - env->halted = 1; > if (pci_enabled) { > apic_init(env); > } > diff --git a/target-i386/helper.c b/target-i386/helper.c > index 2c11cd3..a0d0273 100644 > --- a/target-i386/helper.c > +++ b/target-i386/helper.c > @@ -1694,6 +1694,9 @@ CPUX86State *cpu_x86_init(const char *cpu_model) > cpu_x86_close(env); > return NULL; > } > + > + /* cpu 0 can run, others start at halted state */ > + env->halted = !!env->cpu_index; > cpu_reset(env); > qemu_register_reset(main_cpu_reset, env); > That looks good to me. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux