[Top][All Lists]
[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: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 7/7] RTC: Allow to migrate from old QEMU |
Date: |
Mon, 23 Jul 2012 09:30:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
Il 23/07/2012 07:12, Juan Quintela ha scritto:
> .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);
I think this is not safe. In the load_old case, we ignore the struct tm
because we call rtc_set_time and check_update_timer. We need this to
make up some values of base_rtc, last_update and offset.
In the normal case we need both the CMOS data and the timer data.
Though perhaps I can make a further change and remove current_tm
altogether. I'll take a look this week; however that will make it even
harder to produce the old version.
Paolo
- [Qemu-devel] [PATCH 3/7] RTC: Update interrupt state when interrupts are masked/unmasked, (continued)
- [Qemu-devel] [PATCH 3/7] RTC: Update interrupt state when interrupts are masked/unmasked, Paolo Bonzini, 2012/07/20
- [Qemu-devel] [PATCH 4/7] RTC: Update the RTC clock only when reading it, Paolo Bonzini, 2012/07/20
- [Qemu-devel] [PATCH 5/7] RTC: Add divider reset support, Paolo Bonzini, 2012/07/20
- [Qemu-devel] [PATCH 6/7] RTC: Do not fire timer periodically to catch next alarm, Paolo Bonzini, 2012/07/20
- [Qemu-devel] [PATCH 7/7] RTC: Allow to migrate from old QEMU, Paolo Bonzini, 2012/07/20