From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDeSY-0005ra-8L for qemu-devel@nongnu.org; Mon, 08 Jun 2009 09:00:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDeST-0005ln-Cr for qemu-devel@nongnu.org; Mon, 08 Jun 2009 09:00:17 -0400 Received: from [199.232.76.173] (port=53145 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDeST-0005lX-4g for qemu-devel@nongnu.org; Mon, 08 Jun 2009 09:00:13 -0400 Received: from mx2.redhat.com ([66.187.237.31]:35739) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDeSS-00085F-LG for qemu-devel@nongnu.org; Mon, 08 Jun 2009 09:00:12 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n58D0CnA006529 for ; Mon, 8 Jun 2009 09:00:12 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n58CxmBq011003 for ; Mon, 8 Jun 2009 09:00:02 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n58CxlhC022566 for ; Mon, 8 Jun 2009 08:59:47 -0400 Date: Mon, 8 Jun 2009 15:59:46 +0300 From: Gleb Natapov Message-ID: <20090608125946.GF27210@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [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: qemu-devel@nongnu.org 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) { apic_init(env); } + qemu_register_reset(main_cpu_reset, 0, env); } vmport_init(); -- Gleb.