summary refs log tree commit diff stats
path: root/hw/intc/apic_common.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-12-10 16:56:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-15 12:21:02 +0100
commit575a6f4082c45778b93032ef1e7fbea4467b3a2a (patch)
treef2e37755232d9dc23fa0196856b2e6e6c7753820 /hw/intc/apic_common.c
parent2f9ac42acf4602453d5839221df6cc7cabc3355e (diff)
downloadfocaccia-qemu-575a6f4082c45778b93032ef1e7fbea4467b3a2a.tar.gz
focaccia-qemu-575a6f4082c45778b93032ef1e7fbea4467b3a2a.zip
kvm/apic: fix 2.2->2.1 migration
The wait_for_sipi field is set back to 1 after an INIT, so it was not
effective to reset it in kvm_apic_realize.  Introduce a reset callback
and reset wait_for_sipi there.

Reported-by: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/intc/apic_common.c')
-rw-r--r--hw/intc/apic_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index 4e62f25edb..d9bb188c15 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -178,6 +178,7 @@ bool apic_next_timer(APICCommonState *s, int64_t current_time)
 void apic_init_reset(DeviceState *dev)
 {
     APICCommonState *s = APIC_COMMON(dev);
+    APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
     int i;
 
     if (!s) {
@@ -206,6 +207,10 @@ void apic_init_reset(DeviceState *dev)
         timer_del(s->timer);
     }
     s->timer_expiry = -1;
+
+    if (info->reset) {
+        info->reset(s);
+    }
 }
 
 void apic_designate_bsp(DeviceState *dev)