From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0FQ2-0007iP-UR for qemu-devel@nongnu.org; Sun, 04 Sep 2011 12:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0FQ1-0003Ck-RV for qemu-devel@nongnu.org; Sun, 04 Sep 2011 12:19:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0FQ1-0003Cg-Hn for qemu-devel@nongnu.org; Sun, 04 Sep 2011 12:19:37 -0400 Date: Sun, 4 Sep 2011 19:20:31 +0300 From: "Michael S. Tsirkin" Message-ID: <20110904162031.GD31273@redhat.com> References: <20110904130159.GB23500@redhat.com> <4E63778A.6050002@redhat.com> <20110904134101.GA27239@redhat.com> <4E638355.8030903@redhat.com> <20110904142152.GB27239@redhat.com> <4E638D08.10307@redhat.com> <20110904152621.GA30431@redhat.com> <4E639C72.4020803@redhat.com> <20110904154637.GB31273@redhat.com> <4E639E0E.8040903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E639E0E.8040903@redhat.com> Subject: Re: [Qemu-devel] [PATCH] pci: add standard bridge device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Kevin Wolf , Isaku Yamahata , qemu-devel@nongnu.org On Sun, Sep 04, 2011 at 06:49:34PM +0300, Avi Kivity wrote: > On 09/04/2011 06:46 PM, Michael S. Tsirkin wrote: > >> > >> Why pointers? Regular fields require less upkeep. > > > >Good point. Why does PIIX use pointers? I just copied that ... > > > > It doesn't, at least not completely: > > > struct PCII440FXState { > PCIDevice dev; > MemoryRegion *system_memory; > MemoryRegion *pci_address_space; > MemoryRegion *ram_memory; > MemoryRegion pci_hole; > MemoryRegion pci_hole_64bit; > PAMMemoryRegion pam_regions[13]; > MemoryRegion smram_region; > uint8_t smm_enabled; > bool smram_enabled; > PIIX3State *piix3; > }; > > Arguably, ram_memory and pci_address_space should not be pointers, > since this address space is supplied by 440fx. > > (pci_hole, pci_hole64, pam_regions[], and smram_regions are all > aliases analogous to the bridge windows) I'll switch my code to that, you take care of piix. > -- > error compiling committee.c: too many arguments to function