From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSHkj-0001He-DC for qemu-devel@nongnu.org; Tue, 05 Jan 2010 17:19:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSHkd-0001CS-Sw for qemu-devel@nongnu.org; Tue, 05 Jan 2010 17:19:48 -0500 Received: from [199.232.76.173] (port=45523 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSHkd-0001CG-Kx for qemu-devel@nongnu.org; Tue, 05 Jan 2010 17:19:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53745) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSHkd-0006hs-6U for qemu-devel@nongnu.org; Tue, 05 Jan 2010 17:19:43 -0500 Date: Wed, 6 Jan 2010 00:16:37 +0200 From: "Michael S. Tsirkin" Message-ID: <20100105221637.GF30921@redhat.com> References: <1262590375-11431-1-git-send-email-agraf@suse.de> <1262590375-11431-2-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1262590375-11431-2-git-send-email-agraf@suse.de> Subject: [Qemu-devel] Re: [PATCH 1/6] PCI config space access overhaul List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Blue Swirl , QEMU Developers , Aurelien Jarno On Mon, Jan 04, 2010 at 08:32:50AM +0100, Alexander Graf wrote: > +typedef void (*pci_config_reg_fn)(PCIHostState *s, uint32_t config_reg, > + PCIConfigAddress *conf); > + pci_decode_config_addr_fn would be a better name. > struct PCIHostState { > SysBusDevice busdev; > + pci_config_reg_fn decode_config_reg; > + PCIConfigAddress config_reg_dec; decode_config_addr and config_addr would be better names > uint32_t config_reg; > PCIBus *bus; > }; > > void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len); > uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len); > +void pci_host_init(PCIHostState *s); > +void pci_host_decode_config_reg(PCIHostState *s, uint32_t config_reg, > + PCIConfigAddress *decoded); Shouldn't this be static? And again, pci_host_decode_config_addr would be a better name IMO. -- MST