On 2012-02-05 12:23, Paolo Bonzini wrote:
> 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);
> }
> Hmm, true. The whole load_old is broken, in both APIC and PIT. Need to call the post_load callbacks from there as well. Will fix, thanks. Jan
signature.asc
Description: OpenPGP digital signature
