From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGSJD-0004QA-VW for qemu-devel@nongnu.org; Mon, 02 Sep 2013 07:28:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGSJ8-0005cS-8l for qemu-devel@nongnu.org; Mon, 02 Sep 2013 07:28:39 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47509 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGSJ7-0005bR-VS for qemu-devel@nongnu.org; Mon, 02 Sep 2013 07:28:34 -0400 Message-ID: <5224765E.8090005@suse.de> Date: Mon, 02 Sep 2013 13:28:30 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1375063438-3149-1-git-send-email-afaerber@suse.de> In-Reply-To: <1375063438-3149-1-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC for-next 0/2] QOM VMStateDescription remix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela , "Michael S. Tsirkin" Cc: Paolo Bonzini , qemu-devel@nongnu.org, Anthony Liguori Am 29.07.2013 04:03, schrieb Andreas F=C3=A4rber: > Hello, >=20 > Based on a comment from mst, this mini-series proposes to change semant= ics of > VMStateDescription registration to be more similar to those of static p= roperties. >=20 > Today, a device has one VMStateDescription, the last assignment to dc->= vmsd wins. > This means that a device must take care to include state of its parent = type. > To avoid dealing with individual fields, VMSTATE_STRUCT() and wrappers = have > been used. Such fields often require access of the deprecated QOM paren= t field. >=20 > The proposal is that, e.g., TYPE_CPU assigns its own VMStateDescription= and > derived types (e.g., TYPE_ALPHA_CPU) register a VMStateDescription with= name > and versions to be used and only the fields specific to that type. > In this v1, versions of the parents' vmsd are ignored, so someone chang= ing CPU's > DeviceClass::vmsd (as opposed to DeviceClass::vmsd->fields[0].vmsd) wou= ld need > to assure appropriate .field_exists tests or bump the version of derive= d types' > vmsd as if a field had been added there. Ping? Andreas >=20 > Only rudimentarily tested: I've run some machines that didn't crash on = startup. >=20 > Regards, > Andreas >=20 > Cc: Michael S. Tsirkin > Cc: Juan Quintela > Cc: Anthony Liguori > Cc: Paolo Bonzini >=20 > Andreas F=C3=A4rber (2): > qdev: Construct VMStateDescription from type hierarchy > cpu: Move VMSTATE_CPU() into TYPE_CPU VMStateDescription >=20 > hw/core/qdev.c | 102 ++++++++++++++++++++++++++++++++++++++= +++----- > include/hw/qdev-core.h | 1 + > include/qom/cpu.h | 4 -- > qom/cpu.c | 10 +++++ > stubs/vmstate.c | 1 + > target-alpha/machine.c | 1 - > target-openrisc/machine.c | 1 - > 7 files changed, 103 insertions(+), 17 deletions(-) >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg