From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: RFC qdev path semantics Date: Wed, 16 Jun 2010 14:01:24 +0200 Message-ID: <4C18BD14.7010001@siemens.com> References: <20100614054923.879.33717.stgit@localhost.localdomain> <4C18B786.1060105@siemens.com> <201006161245.27789.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Cc: Markus Armbruster , Alex Williamson , "qemu-devel@nongnu.org" , "chrisw@redhat.com" , "kvm@vger.kernel.org" , "kraxel@redhat.com" , "avi@redhat.com" To: Paul Brook Return-path: Received: from david.siemens.de ([192.35.17.14]:21898 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754705Ab0FPMBu (ORCPT ); Wed, 16 Jun 2010 08:01:50 -0400 In-Reply-To: <201006161245.27789.paul@codesourcery.com> Sender: kvm-owner@vger.kernel.org List-ID: Paul Brook wrote: >> Markus Armbruster wrote: >>> A number of changes to qdev paths have been proposed in various threads. >>> It's becoming harder to keep track of them, so let me sum them up in one >>> place. Please correct me if I misrepresent your ideas. >>> >>> I'm going to describe the current state of things, and the proposed >>> changes (marked with ###). >>> >>> >>> The device tree has the main system bus as root. A child of a bus is a >>> device. A child of a device is a bus. >>> >>> A qdev path consists of qdev path components separated by '/'. It >>> resolves to a node in the device tree, either bus or device. >>> >>> The qdev path "/" resolves to the root, i.e. the main system bus. >> Another aspect: A path may start with an arbitrary bus name, not only >> the system bus. Although this is ambiguous, we need to keep it for >> addressing the bus itself due to existing client use. But, IMO, we >> should at least start deprecating this for addressing elements below >> that bus (e.g. "pci.0/e1000"). > > I think this would be better served by adding explicit aliases/IDs for those > use-cases. i.e. define the global ID "pci.0" to be an alias for > /i440FX-pcihost/pci Makes sense. We could attach this ID to the BusState (corresponding to DeviceState:id) and manually set it during machine init. qbus_find_recursive would then look for a matching ID instead of a name. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59644 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOrJK-0006y4-Lb for qemu-devel@nongnu.org; Wed, 16 Jun 2010 08:01:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOrJJ-0008LA-KU for qemu-devel@nongnu.org; Wed, 16 Jun 2010 08:01:38 -0400 Received: from david.siemens.de ([192.35.17.14]:21814) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOrJJ-0008Ko-Am for qemu-devel@nongnu.org; Wed, 16 Jun 2010 08:01:37 -0400 Message-ID: <4C18BD14.7010001@siemens.com> Date: Wed, 16 Jun 2010 14:01:24 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20100614054923.879.33717.stgit@localhost.localdomain> <4C18B786.1060105@siemens.com> <201006161245.27789.paul@codesourcery.com> In-Reply-To: <201006161245.27789.paul@codesourcery.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: RFC qdev path semantics List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: "chrisw@redhat.com" , "kvm@vger.kernel.org" , Markus Armbruster , "qemu-devel@nongnu.org" , Alex Williamson , "kraxel@redhat.com" , "avi@redhat.com" Paul Brook wrote: >> Markus Armbruster wrote: >>> A number of changes to qdev paths have been proposed in various threads. >>> It's becoming harder to keep track of them, so let me sum them up in one >>> place. Please correct me if I misrepresent your ideas. >>> >>> I'm going to describe the current state of things, and the proposed >>> changes (marked with ###). >>> >>> >>> The device tree has the main system bus as root. A child of a bus is a >>> device. A child of a device is a bus. >>> >>> A qdev path consists of qdev path components separated by '/'. It >>> resolves to a node in the device tree, either bus or device. >>> >>> The qdev path "/" resolves to the root, i.e. the main system bus. >> Another aspect: A path may start with an arbitrary bus name, not only >> the system bus. Although this is ambiguous, we need to keep it for >> addressing the bus itself due to existing client use. But, IMO, we >> should at least start deprecating this for addressing elements below >> that bus (e.g. "pci.0/e1000"). > > I think this would be better served by adding explicit aliases/IDs for those > use-cases. i.e. define the global ID "pci.0" to be an alias for > /i440FX-pcihost/pci Makes sense. We could attach this ID to the BusState (corresponding to DeviceState:id) and manually set it during machine init. qbus_find_recursive would then look for a matching ID instead of a name. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux