From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDxMI-00025u-Ll for qemu-devel@nongnu.org; Tue, 09 Jun 2009 05:11:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDxME-00025V-2o for qemu-devel@nongnu.org; Tue, 09 Jun 2009 05:11:06 -0400 Received: from [199.232.76.173] (port=34529 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDxMD-00025H-KP for qemu-devel@nongnu.org; Tue, 09 Jun 2009 05:11:01 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50370) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDxMD-0006DM-8j for qemu-devel@nongnu.org; Tue, 09 Jun 2009 05:11:01 -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 n599B07B014995 for ; Tue, 9 Jun 2009 05:11:00 -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 n599Ax7R000953 for ; Tue, 9 Jun 2009 05:10:59 -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 n599Aw6c021134 for ; Tue, 9 Jun 2009 05:10:58 -0400 From: Gleb Natapov Date: Tue, 9 Jun 2009 12:10:56 +0300 Message-Id: <1244538657-7878-1-git-send-email-gleb@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] 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 --- hw/pc.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 0934778..d5b4112 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -878,12 +878,8 @@ 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); } } -- 1.6.2.1