From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV2xH-0004wu-F2 for qemu-devel@nongnu.org; Wed, 13 Jan 2010 08:08:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV2xD-0004vZ-SM for qemu-devel@nongnu.org; Wed, 13 Jan 2010 08:08:11 -0500 Received: from [199.232.76.173] (port=45417 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV2xD-0004vQ-LX for qemu-devel@nongnu.org; Wed, 13 Jan 2010 08:08:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10576) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV2xC-0003uk-JZ for qemu-devel@nongnu.org; Wed, 13 Jan 2010 08:08:07 -0500 Date: Wed, 13 Jan 2010 15:04:57 +0200 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH 3/6] versatile_pci: user PCIHostState instead of PCIBus Message-ID: <20100113130457.GA13558@redhat.com> References: <1263286378-10398-1-git-send-email-yamahata@valinux.co.jp> <1263286378-10398-4-git-send-email-yamahata@valinux.co.jp> <201001131302.50565.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001131302.50565.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Isaku Yamahata , qemu-devel@nongnu.org, agraf@suse.de On Wed, Jan 13, 2010 at 01:02:50PM +0000, Paul Brook wrote: > On Tuesday 12 January 2010, Isaku Yamahata wrote: > > To use pci host framework, use PCIHostState instead of PCIBus in > > PCIVPBState. > > No. > > pci_host.[ch] provides very specific functionality, it is not a generic PCI > host device. Specifically it provides indirect access to PCI config space via > a memory mapped {address,data} pair. The versatile PCI host exposes PCI config > space directly, so should not be using this code. > > If you want a generic framework for PCI hosts then you need to use something > else. If nothing else, assuming that a PCI host bridge is always is SysBus > device is wrong. > > Paul What most people seem to want is callback that will get length is a parameter instead of supplying 3 functions. pci_host does it but we do not need pci_host for this. -- MST