From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Brook Subject: Re: Re: [PATCH] Add support for a configuration file Date: Wed, 14 May 2008 16:18:04 +0100 Message-ID: <200805141618.05486.paul@codesourcery.com> References: <1210713545-11916-1-git-send-email-aliguori@us.ibm.com> <200805141526.34293.paul@codesourcery.com> <482B009C.2070101@us.ibm.com> Reply-To: qemu-devel@nongnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org To: Anthony Liguori Return-path: In-Reply-To: <482B009C.2070101@us.ibm.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On Wednesday 14 May 2008, Anthony Liguori wrote: > Paul Brook wrote: > >> the "class" field is used to select the device model. Then all the other > >> parameters are used to initialize the device model. That way it is > >> possible to keep the compatibility with the existing options and add a > >> provision to instanciate arbitrary new device models, such as: > > > > I like the idea, but I'm not so keen on the automatic allocation. I > > generally prefer explicit declaration over implicit things. The latter > > makes it very easy to not notice when you make a typo. > > > > It sounds like what you really want is something similar to an OF device > > tree. So you have something like: > > > > # pciide0 may be an alias (possibly provided by qemu) > > # e.g. pci0.slot1.func1.ide > > alias hda ide0.primary.master > > What I don't like about the ide0.primary.master syntax is that there > isn't enough structure. I would prefer: > > alias hda ide,bus=0,primary,master > > If you combine this with your magic variable idea, you could also do: > > alias hda ide,bus=0,unit=$next > > But you could also just fold that into Fabrice's syntax (which I prefer): What I dislike about this is that it's a flat format, where you identify things by setting some combination of attributes. I really like the idea of having a tree structure. Paul