From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeQD5-0000c7-VS for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:15:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeQD1-0000Vu-8B for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:14:59 -0400 Received: from [199.232.76.173] (port=55078 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeQD0-0000Vi-ES for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:14:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12968) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MeQCz-0007y3-65 for qemu-devel@nongnu.org; Fri, 21 Aug 2009 05:14:53 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7L9Eqwx002836 for ; Fri, 21 Aug 2009 05:14:52 -0400 Message-ID: <4A8E657D.4040604@redhat.com> Date: Fri, 21 Aug 2009 11:14:37 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <20ca5615c8cdc456296698133e3b0dbd5a1f4de7.1250788880.git.quintela@redhat.com> <4A8E6049.6020609@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 21/23] Port PCIDevice state to VMState List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On 08/21/09 11:01, Juan Quintela wrote: > I agree that the INT32_EQUAL is a bad idea. But that is how > the current code is done. Consider changing the code then ;) >> Beside that we'll have to think about how to handle versioning of >> structs. Do we want vmstate_pci_device (and all others) have its own >> version? Probably makes sense. Handling this should go into the >> generic code then and not be hacked into each structure using >> VMSTATE_INT32_LE(). > > Proper solution here is to use subsections. > Each time that you call VMSTATE_PCI_DEVICE() it sends a subsection > there. Then we get the versioning by free. This is how I am thinking > it is the right way to do it. Yep, something like this. > virtio stuff: the more than I think about it, the easier way is to just > get rid of the whole mess and do something that is sensible. You are talking about VirtIOPCIProxy I guess? Yea, that is messy ... cheers, Gerd