aboutsummaryrefslogtreecommitdiff
path: root/hw/apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/apic.c')
-rw-r--r--hw/apic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 43d748cabd..64e75ad0f0 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -869,6 +869,10 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id)
static void apic_reset(void *opaque)
{
APICState *s = opaque;
+
+ s->apicbase = 0xfee00000 |
+ (s->id ? 0 : MSR_IA32_APICBASE_BSP) | MSR_IA32_APICBASE_ENABLE;
+
apic_init_ipi(s);
if (s->id == 0) {
@@ -906,8 +910,6 @@ int apic_init(CPUState *env)
s->id = last_apic_id++;
env->cpuid_apic_id = s->id;
s->cpu_env = env;
- s->apicbase = 0xfee00000 |
- (s->id ? 0 : MSR_IA32_APICBASE_BSP) | MSR_IA32_APICBASE_ENABLE;
apic_reset(s);