|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore |
Date: | Sun, 05 Feb 2012 12:23:51 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
On 02/05/2012 11:46 AM, Jan Kiszka wrote:
diff --git a/hw/i8254_common.c b/hw/i8254_common.c index 0601d88..b60fbda 100644 --- a/hw/i8254_common.c +++ b/hw/i8254_common.c @@ -234,9 +234,8 @@ static int pit_load_old(QEMUFile *f, void *opaque, int version_id) qemu_get_8s(f,&s->gate); s->count_load_time = qemu_get_be64(f); s->irq_disabled = 0; - if (s->irq_timer) { + if (i == 0) { s->next_transition_time = qemu_get_be64(f); - qemu_get_timer(f, s->irq_timer); } } return 0;
You need to invoke the post load callback manually in the load_old callback; see vmstate_load_state:
if (version_id < vmsd->minimum_version_id) { return vmsd->load_state_old(f, opaque, version_id); }I noticed that in apic_common's apic_load_old you don't have the bug, but on the other hand you're unconditionally loading into s->timer, so "old" migration to a destination with in-kernel APIC doesn't work:
if (version_id >= 2) { qemu_get_timer(f, s->timer); } Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |