From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDHng-00023F-UM for qemu-devel@nongnu.org; Wed, 25 Nov 2009 08:20:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDHnY-00020L-EU for qemu-devel@nongnu.org; Wed, 25 Nov 2009 08:20:49 -0500 Received: from [199.232.76.173] (port=42798 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDHnX-0001zx-K5 for qemu-devel@nongnu.org; Wed, 25 Nov 2009 08:20:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13526) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDHnW-0003mI-W5 for qemu-devel@nongnu.org; Wed, 25 Nov 2009 08:20:43 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAPDKfkH008284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Nov 2009 08:20:41 -0500 Date: Wed, 25 Nov 2009 15:18:04 +0200 From: "Michael S. Tsirkin" Message-ID: <20091125131804.GB9333@redhat.com> References: <1259060788-17411-1-git-send-email-kraxel@redhat.com> <1259060788-17411-2-git-send-email-kraxel@redhat.com> <20091124141122.GM2405@redhat.com> <4B0D2936.9000707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B0D2936.9000707@redhat.com> Subject: [Qemu-devel] Re: [PATCH 2/2] qdev: add command line option to set global defaults for properties. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Wed, Nov 25, 2009 at 01:55:18PM +0100, Gerd Hoffmann wrote: > On 11/24/09 15:11, Michael S. Tsirkin wrote: >> On Tue, Nov 24, 2009 at 12:06:28PM +0100, Gerd Hoffmann wrote: >>> This patch adds infrastructure and command line option for setting >>> global defaults for device properties, i.e. you can for example use >>> >>> -global virtio-blk-pci.vectors=0 >>> >>> to turn off msi by default for all virtio block devices. The config >>> file syntax is: >>> >>> [global] >>> driver = "virtio-blk-pci" >>> property = "vectors" >>> value = "0" >> >> Where's this documented? > > config file syntax is git-style, the details are not (yet) documented. > > Easiest way to get one if you want to play with it is > "qemu -writeconfig ". > > Note that not all command line options are covered. > > I've attached a sample to this mail. Needs a few patches sent to the > list yesterday and today to actually work though. > >> How would one figure out the command lines you give in >> the examples above? > > "info qtree" in monitor prints the device names and properties for all > devices used by the virtual machine. > > "info qdm" and '-device ?' list all devices known to qemu. So maybe add "use -device ? to get list of all devices" to help text? [mst@tuck qemu]$ ~/qemu-git/bin/qemu-system-x86_64 -device ? /home/mst/qemu-git/bin/qemu-system-x86_64: invalid option -- '-device' [mst@tuck qemu]$ ~/qemu-git/bin/qemu-system-x86_64 --device ? /home/mst/qemu-git/bin/qemu-system-x86_64: invalid option -- '-device' > The device > properties are not listed there though (one of the items on my todo > list). Yes, and in fact each option should supply a help text explaining what it is. This was not done this way upfront and each day makes it harder to document as new options are added without documentation. > cheers, > Gerd