From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDfV1-0006ZQ-L1 for qemu-devel@nongnu.org; Mon, 08 Jun 2009 10:06:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDfUw-0006Rs-In for qemu-devel@nongnu.org; Mon, 08 Jun 2009 10:06:54 -0400 Received: from [199.232.76.173] (port=43111 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDfUw-0006RM-8B for qemu-devel@nongnu.org; Mon, 08 Jun 2009 10:06:50 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34581) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDfUv-0005zz-EM for qemu-devel@nongnu.org; Mon, 08 Jun 2009 10:06:49 -0400 Date: Mon, 8 Jun 2009 17:06:44 +0300 From: Gleb Natapov Message-ID: <20090608140644.GJ27210@redhat.com> References: <20090608125946.GF27210@redhat.com> <4A2D1A27.4080504@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2D1A27.4080504@siemens.com> Subject: [Qemu-devel] Re: [PATCH v2] Apic creation should not depend on pci List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org On Mon, Jun 08, 2009 at 04:03:19PM +0200, Jan Kiszka wrote: > Gleb Natapov wrote: > > > > It should depend on whether cpu has APIC. > > > > Signed-off-by: Gleb Natapov > > diff --git a/hw/pc.c b/hw/pc.c > > index 0934778..cb49772 100644 > > --- a/hw/pc.c > > +++ b/hw/pc.c > > @@ -878,14 +878,10 @@ static void pc_init1(ram_addr_t ram_size, > > } > > if (i != 0) > > env->halted = 1; > > - if (smp_cpus > 1) { > > - /* XXX: enable it in all cases */ > > - env->cpuid_features |= CPUID_APIC; > > - } > > - qemu_register_reset(main_cpu_reset, 0, env); > > - if (pci_enabled) { > > + if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) { > > Obviously :), I'm fine with that change. Needs testing, though. What > scenarios did you already check? > :) Only standard runs. I don't have 486 smp guest around. > > apic_init(env); > > } > > + qemu_register_reset(main_cpu_reset, 0, env); > > But this line silently reorders CPU and APIC reset handlers. If you did > it intentionally (I vaguely recall it may have some benefit /wrt KVM > synchronizing kernel and user space states), I would suggest pushing it > as a separate patch. I don't know what this line is doing here. I'll remove it -- Gleb.