]> xenbits.xensource.com Git - qemu-xen-4.2-testing.git/commitdiff
Apic creation should not depend on pci
authorGleb Natapov <gleb@redhat.com>
Mon, 8 Jun 2009 12:59:46 +0000 (15:59 +0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Sun, 14 Jun 2009 00:18:54 +0000 (19:18 -0500)
It should depend on whether cpu has APIC.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pc.c

diff --git a/hw/pc.c b/hw/pc.c
index aa9257679be0ba8fe08cf4bb5113843fc1d0778a..dc284970e47cbba17e87b1284824c34205db2d75 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -876,16 +876,10 @@ static void pc_init1(ram_addr_t ram_size,
             fprintf(stderr, "Unable to find x86 CPU definition\n");
             exit(1);
         }
-        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();