From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm8ED-0005YS-Da for qemu-devel@nongnu.org; Fri, 11 Sep 2009 11:40:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm8E7-0005U0-Ml for qemu-devel@nongnu.org; Fri, 11 Sep 2009 11:40:00 -0400 Received: from [199.232.76.173] (port=41175 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm8E7-0005Tf-8w for qemu-devel@nongnu.org; Fri, 11 Sep 2009 11:39:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4982) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mm7a0-0001X6-J4 for qemu-devel@nongnu.org; Fri, 11 Sep 2009 10:58:28 -0400 Message-ID: <4AAA6591.4030904@redhat.com> Date: Fri, 11 Sep 2009 16:58:25 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1252672351-12937-1-git-send-email-kraxel@redhat.com> <1252672351-12937-6-git-send-email-kraxel@redhat.com> <4AAA5AFD.1020509@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 5/8] ide/pci: convert to qdev. 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 09/11/09 16:35, Juan Quintela wrote: >>>> - IDEBus bus[2]; >>>> + IDEBus *bus[2]; > > You notice this little thing "*" that changed? > VMState preffers pretty much embedded arrays than pointers (arrays of > pointers have the same problem, basically). > > Notice the "preffers" part. VMState can follow pointers, just that each > VMStateDescription is a series of offsets in one structure. Having > pointers brings to you all the problems associated with ioctl's with > pointers in the middle of the payload. It is doable, just not nice. I don't see the problem here. You'll need a separate VMStateDescription for a IDEBus anyway, then have all the ide drivers use that, just to avoid duplication. ide will just be vmstate_ide_bus(bus) pci will be something like vmstate_pci() /* busmaster stuff goes here */ vmstate_ide_bus(bus[0]) vmstate_ide_bus(bus[1]) I fail to see how it makes a big difference whenever the ide bus is referenced or embedded ... cheers, Gerd