aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hw/pc.c1
-rw-r--r--target-i386/helper.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/hw/pc.c b/hw/pc.c
index eb4c2d877..25bfa8502 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -941,7 +941,6 @@ static CPUState *pc_new_cpu(const char *cpu_model)
exit(1);
}
if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) {
- env->cpuid_apic_id = env->cpu_index;
env->apic_state = apic_init(env, env->cpuid_apic_id);
}
qemu_register_reset(pc_cpu_reset, env);
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 6c6a1675d..2586aff70 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1257,6 +1257,7 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
cpu_x86_close(env);
return NULL;
}
+ env->cpuid_apic_id = env->cpu_index;
mce_init(env);
qemu_init_vcpu(env);