From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqmcu-00089B-Py for qemu-devel@nongnu.org; Tue, 09 Aug 2011 09:45:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qqmcm-0004Ki-Rn for qemu-devel@nongnu.org; Tue, 09 Aug 2011 09:45:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqmcm-00041n-CD for qemu-devel@nongnu.org; Tue, 09 Aug 2011 09:45:40 -0400 Message-ID: <4E410D5C.4050401@redhat.com> Date: Tue, 09 Aug 2011 12:35:08 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1312738160-28961-1-git-send-email-michael@walle.cc> In-Reply-To: <1312738160-28961-1-git-send-email-michael@walle.cc> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/4] usb/hid: bugfixes, more on usb and hid split List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Walle Cc: qemu-devel@nongnu.org On 08/07/11 19:29, Michael Walle wrote: > This USB patchset moves the VM state stuff from usb-hid.c to hid.c, so it > can be reused by other devices. Nice. > There is one major drawback: i need to increase the vmstate version_id of > the usb-hid device. I don't know if you agree with this change. > Alternatively, we could add a load_old function which just skips old > versions. You don't have to change the version. The binary representation in the savevm format doesn't change if you move the fields from vmstate_usb_ptr to vmstate_hid_ptr_device. For anything referenced via VMS_STRUCT the vmstate->name is just there to beautify the source code, it isn't used at all when reading/writing the state. No new section, no nothing. The savevm code only looks at ->fields and writes them out (and executes the hooks). Reordering the fields (like you did with the keyboard) isn't going to work though. cheers, Gerd