From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JwIkD-0004sN-4t for qemu-devel@nongnu.org; Wed, 14 May 2008 11:18:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JwIk8-0004nk-L1 for qemu-devel@nongnu.org; Wed, 14 May 2008 11:18:14 -0400 Received: from [199.232.76.173] (port=56618 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JwIk7-0004nQ-QM for qemu-devel@nongnu.org; Wed, 14 May 2008 11:18:11 -0400 Received: from mail.codesourcery.com ([65.74.133.4]:34433) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JwIk7-0003nQ-6S for qemu-devel@nongnu.org; Wed, 14 May 2008 11:18:11 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file Date: Wed, 14 May 2008 16:18:04 +0100 References: <1210713545-11916-1-git-send-email-aliguori@us.ibm.com> <200805141526.34293.paul@codesourcery.com> <482B009C.2070101@us.ibm.com> In-Reply-To: <482B009C.2070101@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805141618.05486.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.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