diff mbox

[kvm-Bugs-2835276] segfault using -cpu pentium3 on coreduo

Message ID E1Pv6pf-0006Pb-Rk@sfs-web-3.v29.ch3.sourceforge.com (mailing list archive)
State New, archived
Headers show

Commit Message

SourceForge.net March 3, 2011, 11:36 a.m. UTC
None
diff mbox

Patch

--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1096,11 +1096,11 @@  CPUState *pc_new_cpu(const char *cpu_model)
         }
         if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) {
             env->cpuid_apic_id = env->cpu_index;
-            /* APIC reset callback resets cpu */
-            apic_init(env);
         } else {
             qemu_register_reset((QEMUResetHandler*)cpu_reset, env);
         }
+            /* APIC reset callback resets cpu */
+            apic_init(env);
 
     /* kvm needs this to run after the apic is initialized. Otherwise,
      * it can access invalid state and crash.