From 575a6f4082c45778b93032ef1e7fbea4467b3a2a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 10 Dec 2014 16:56:46 +0100 Subject: 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 Cc: qemu-stable@nongnu.org Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- hw/intc/apic_common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/intc/apic_common.c') 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) -- cgit 1.4.1