Commit c4f31a0a0c1f44a5253f892fea4e711028021c66
Committed by
Anthony Liguori
1 parent
df97b920
Apic creation should not depend on pci
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>
Showing
1 changed file
with
2 additions
and
8 deletions
hw/pc.c
... | ... | @@ -876,16 +876,10 @@ static void pc_init1(ram_addr_t ram_size, |
876 | 876 | fprintf(stderr, "Unable to find x86 CPU definition\n"); |
877 | 877 | exit(1); |
878 | 878 | } |
879 | - if (i != 0) | |
880 | - env->halted = 1; | |
881 | - if (smp_cpus > 1) { | |
882 | - /* XXX: enable it in all cases */ | |
883 | - env->cpuid_features |= CPUID_APIC; | |
884 | - } | |
885 | - qemu_register_reset(main_cpu_reset, 0, env); | |
886 | - if (pci_enabled) { | |
879 | + if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) { | |
887 | 880 | apic_init(env); |
888 | 881 | } |
882 | + qemu_register_reset(main_cpu_reset, 0, env); | |
889 | 883 | } |
890 | 884 | |
891 | 885 | vmport_init(); | ... | ... |