From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48604 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PW33D-0006DJ-Um for qemu-devel@nongnu.org; Fri, 24 Dec 2010 03:31:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PW33C-00052u-Bk for qemu-devel@nongnu.org; Fri, 24 Dec 2010 03:30:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PW33C-00052m-4s for qemu-devel@nongnu.org; Fri, 24 Dec 2010 03:30:58 -0500 Date: Fri, 24 Dec 2010 10:30:35 +0200 From: "Michael S. Tsirkin" Message-ID: <20101224083034.GA1680@redhat.com> References: <20101222110443.GB10771@redhat.com> <20101222113640.GC7603@valinux.co.jp> <20101222120354.GA17009@redhat.com> <20101224015756.GD7603@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101224015756.GD7603@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH 2/3] pci: introduce a parser for fw device path to pci device List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org On Fri, Dec 24, 2010 at 10:57:56AM +0900, Isaku Yamahata wrote: > On Wed, Dec 22, 2010 at 02:03:55PM +0200, Michael S. Tsirkin wrote: > > On Wed, Dec 22, 2010 at 08:36:40PM +0900, Isaku Yamahata wrote: > > > On Wed, Dec 22, 2010 at 01:04:43PM +0200, Michael S. Tsirkin wrote: > > > > On Wed, Dec 22, 2010 at 07:54:49PM +0900, Isaku Yamahata wrote: > > > > > Introduce a function to parse fw device path to pci device. > > > > > the format is > > > > > /pci@{, }/[]@,/.../[]@, > > > > > > > > > > = "i" > > > > > = > > > > > = slot number in hex > > > > > = func number in hex > > > > > > > > > > Signed-off-by: Isaku Yamahata > > > > > > > > What concerns me the most here is the use of io addresses, > > > > not sure it's the right thing for the command interface. > > > > > > > > Why do we need to support full path at all? Can we use the id of the > > > > parent bus for this? Supplying a bus id for the device seems like a > > > > natural way to describe a tree, with minimal need for parsing. > > > > > > The ids of most devices are set NULL currently. So the id is useless > > > right now unfortunately. > > > > It's up to the user to assign ids. If one doesn't one won't be able > > to activate hotplug/aer, which does not seem like a serious limitation. > > > > > Maybe how to assign ids to all of qdevs > > > systematically would be difficult. > > > > I don't think it's urgent. No id -> can't use some of the > > functionality. No big deal IMO. > > Hmm, it's big deal for me. OK, but why? Another push in qdev/machine description direction can only be a good thing, no? > How about trying id first, if failed, then trying fw device path > as fall back? Well what bothered me with the proposed format in cli didn't go away. Specifically the use of the io address as device name really looks strange, and the mmio address is guest assigned, isn't it? Also, for QMP, it seems we should be using arrays and attributes, instead of asking everyone to build up/parse a path. > > > > > To be honest, I don't have strong opinion for format of pci topology. > > > So far we discussed the following candidates. > > > what format do you prefer? > > > > > > - domain::. > > > guest assigns bus number, so this can't be used for qemu internal use. > > > - domain:00:.:...:. > > > - fw device path > > > - id > > > Unfortunately id is NULL for most devices right now. So id doesn't work. > > > - any other? > > > > > > thanks, > > > -- > > > yamahata > > > > -- > yamahata