From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StD67-0003VU-24 for qemu-devel@nongnu.org; Mon, 23 Jul 2012 03:30:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StD63-0006LX-1Q for qemu-devel@nongnu.org; Mon, 23 Jul 2012 03:30:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StD62-0006LM-Pi for qemu-devel@nongnu.org; Mon, 23 Jul 2012 03:30:26 -0400 Message-ID: <500CFD8E.3070206@redhat.com> Date: Mon, 23 Jul 2012 09:30:22 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1342781633-7288-1-git-send-email-pbonzini@redhat.com> <1342781633-7288-8-git-send-email-pbonzini@redhat.com> <87eho3kqln.fsf@elfo.mitica> In-Reply-To: <87eho3kqln.fsf@elfo.mitica> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 7/7] RTC: Allow to migrate from old QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: "Zhang, Yang Z" , qemu-devel@nongnu.org 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