qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 7/7] RTC: Allow to migrate from old QEMU


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 7/7] RTC: Allow to migrate from old QEMU
Date: Mon, 23 Jul 2012 07:12:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux)

Paolo Bonzini <address@hidden> wrote:
> From: "Zhang, Yang Z" <address@hidden>
>
> The new logic is compatible with old, and it should not block migration
> from old QEMU.  However, the new version cannot migrate to the old one.
>
> Cc: Juan Quintela <address@hidden>

I guess that you removed the tm structs.

This are the current fields.

    .fields      = (VMStateField []) {
        VMSTATE_BUFFER(cmos_data, RTCState),
        VMSTATE_UINT8(cmos_index, RTCState),
        VMSTATE_INT32(current_tm.tm_sec, RTCState),
        VMSTATE_INT32(current_tm.tm_min, RTCState),
        VMSTATE_INT32(current_tm.tm_hour, RTCState),
        VMSTATE_INT32(current_tm.tm_wday, RTCState),
        VMSTATE_INT32(current_tm.tm_mday, RTCState),
        VMSTATE_INT32(current_tm.tm_mon, RTCState),
        VMSTATE_INT32(current_tm.tm_year, RTCState),

you can change this to:

        VMSTATE_UNUSED(7*4);

Some for the others.

        VMSTATE_TIMER(periodic_timer, RTCState),
        VMSTATE_INT64(next_periodic_time, RTCState),
        VMSTATE_INT64(next_second_time, RTCState),
        VMSTATE_TIMER(second_timer, RTCState),
        VMSTATE_TIMER(second_timer2, RTCState),
        VMSTATE_UINT32_V(irq_coalesced, RTCState, 2),
        VMSTATE_UINT32_V(period, RTCState, 2),
        VMSTATE_END_OF_LIST()
    }


>  static const VMStateDescription vmstate_rtc = {
>      .name = "mc146818rtc",
> -    .version_id = 2,
> -    .minimum_version_id = 1,
> +    .version_id = 3,
> +    .minimum_version_id = 3,
>      .minimum_version_id_old = 1,
> +    .load_state_old = rtc_load_old,
>      .post_load = rtc_post_load,
>      .fields      = (VMStateField []) {
>          VMSTATE_BUFFER(cmos_data, RTCState),
> @@ -837,7 +873,7 @@ static int rtc_initfn(ISADevice *dev)

no changes in the other part of vmstate?  that is at least strange?  I
guess they are on the other patches on the series.  Will take a look.


>      memory_region_init_io(&s->io, &cmos_ops, s, "rtc", 2);
>      isa_register_ioport(dev, &s->io, base);
>  
> -    qdev_set_legacy_instance_id(&dev->qdev, base, 2);
> +    qdev_set_legacy_instance_id(&dev->qdev, base, 3);
>      qemu_register_reset(rtc_reset, s);
>  
>      object_property_add(OBJECT(s), "date", "struct tm",



reply via email to

[Prev in Thread] Current Thread [Next in Thread]