qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT c4f31a0] Apic creation should not depend on pci


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT c4f31a0] Apic creation should not depend on pci
Date: Mon, 15 Jun 2009 02:26:42 -0000

From: Gleb Natapov <address@hidden>

It should depend on whether cpu has APIC.

Signed-off-by: Gleb Natapov <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/hw/pc.c b/hw/pc.c
index aa92576..dc28497 100644
--- 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();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]