From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Bellard Subject: Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file Date: Wed, 14 May 2008 14:26:40 +0200 Message-ID: <482ADA80.3000309@bellard.org> References: <1210713545-11916-1-git-send-email-aliguori@us.ibm.com> <482A1F1C.2020902@codemonkey.ws> <482AA268.9080501@bellard.org> <482ABF6E.6090100@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Paul Brook To: Avi Kivity , qemu-devel@nongnu.org Return-path: In-Reply-To: <482ABF6E.6090100@qumranet.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Fabrice Bellard wrote: >> >> I prefer: >> >> drive.file=foo.img >> drive.if=scsi >> > > That doesn't support multiple drives very well. Right, I realized it afterwards ! I suggested it because my original plan for the configuration file was based on this syntax with a strong inspiration from the OpenFirmware device tree. The idea was that the object name ("drive" here) had no hardcoded meaning, except for some predefined object names in order to keep a kind of backward compatibility with the current QEMU options. In order to create a new drive for example, you just have to do: mydrive.class=drive mydrive.if=scsi mydrive.file=abc.img 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: mynetworkcard.class="ne2000pci" mynetworkcard.bus=1 # pci bus selection mynetworkcard.macaddr=00:01:02:03:04:05 mynetworkcard.vlan=1 I will strongly support configuration file formats having this property. Regards, Fabrice. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/