From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWSLO-0001nW-8W for qemu-devel@nongnu.org; Fri, 02 Dec 2011 07:36:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWSLK-0000pH-6v for qemu-devel@nongnu.org; Fri, 02 Dec 2011 07:35:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWSLJ-0000pA-UX for qemu-devel@nongnu.org; Fri, 02 Dec 2011 07:35:54 -0500 Message-ID: <4ED8C622.3000603@redhat.com> Date: Fri, 02 Dec 2011 13:35:46 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1322687028-29714-1-git-send-email-aliguori@us.ibm.com> <1322687028-29714-15-git-send-email-aliguori@us.ibm.com> <4ED7A159.20902@redhat.com> <4ED82799.20806@codemonkey.ws> In-Reply-To: <4ED82799.20806@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 14/18] rtc: add a dynamic property for retrieving the date List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino Hi, > https://github.com/aliguori/qidl/ > > In your example: > > struct SomeDev { > DeviceState _immutable dev; > Chardev _immutable *chr; > uint32_t reg1; > uint32_t reg2; > [ ... ] > }; > >> >> ... instead of the vmstate structs we create manually today. Likewise >> for properties. And probably we can even generate different visitors >> for different "views" at the same struct. > > qc generates a json description of the struct. You can then use a > generate to take that json and generate code for VMState, QAPI, etc. > > The readme has quite a lot of detail about the syntax. The parser is > pretty complete already. > > https://github.com/aliguori/qidl/blob/master/qc.md Ah, nice. Any plans to support lists there, so it is possible to save the state of (multiple) in-flight transactions? > But I want to get us moving on QOM first before I go any further with > this. We can always go back and remove the manually written visit > functions. Sure, one step at a time. It helps when reviewing to have a rough idea of the big pixture though ... cheers, Gerd