qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/4] usb/hid: bugfixes, more on usb and hid spli


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 0/4] usb/hid: bugfixes, more on usb and hid split
Date: Tue, 09 Aug 2011 12:35:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Red Hat/3.1.11-2.el6_1 Thunderbird/3.1.11

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



reply via email to

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