qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 2/2] qdev: add command line option to set global	defaults for properties.
Date: Wed, 25 Nov 2009 13:55:18 +0100	[thread overview]
Message-ID: <4B0D2936.9000707@redhat.com> (raw)
In-Reply-To: <20091124141122.GM2405@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]

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 <all-your-vm-options-here> -writeconfig <filename>".

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.  The device 
properties are not listed there though (one of the items on my todo list).

cheers,
   Gerd

[-- Attachment #2: x86-gfx.cfg --]
[-- Type: text/plain, Size: 1617 bytes --]

# qemu config file

# The config file doesn't yet cover all possible options.
#
# minimum command line:
#   qemu -nodefaults -vga cirrus -readconfig $thisfile
#
# you might want to add these switches:
#   -enable-kvm -m <mem> -smp <cpus> -vnc <display> -monitor <chardev>
#
# create a new config file for your guest, for the bits already covered:
#   qemu <tons-of-switches-here> -writeconfig <name>.cfg

#####################################################
# host side configuration

[drive "hda"]
  if = "none"
  file = "/vmdisk/arch-x86.img"

[drive "hdc"]
  if = "none"
  media = "cdrom"

[drive "sda"]
  if = "none"
  file = "/vmdisk/test-lsi-1.img"

[drive "sdb"]
  if = "none"
  file = "/vmdisk/test-lsi-2.img"

[drive "vda"]
  if = "none"
  file = "/vmdisk/test-vio-1.img"

[chardev "ttyS0"]
  backend = "vc"
  cols = "100"
  rows = "50"

[netdev "eth0"]
  type = "user"

#####################################################
# guest devices

[device]
  driver = "ide-drive"
  bus = "ide.0"
  drive = "hda"

[device]
  driver = "ide-drive"
  bus = "ide.1"
  drive = "hdc"

[device]
  driver = "isa-serial"
  chardev = "ttyS0"

[device]
  driver = "e1000"
  netdev = "eth0"
  mac = "52:54:00:78:23:6f"
  addr = "06.0"

[device]
  driver = "AC97"
  addr = "05.0"

[device]
  driver = "virtio-balloon-pci"
  addr = "08.0"

[device]
  driver = "virtio-blk-pci"
  addr = "0c.0"
  drive = "vda"

[device "lsi"]
  driver = "lsi53c895a"
  addr = "0a.0"

[device]
  driver = "scsi-disk"
  bus = "lsi.0"
  scsi-id = "0"
  drive = "sda"

[device]
  driver = "scsi-disk"
  bus = "lsi.0"
  scsi-id = "2"
  drive = "sdb"


  reply	other threads:[~2009-11-25 12:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24 11:06 [Qemu-devel] [PATCH 1/2] qdev: make compat stuff more generic Gerd Hoffmann
2009-11-24 11:06 ` [Qemu-devel] [PATCH 2/2] qdev: add command line option to set global defaults for properties Gerd Hoffmann
2009-11-24 14:11   ` [Qemu-devel] " Michael S. Tsirkin
2009-11-25 12:55     ` Gerd Hoffmann [this message]
2009-11-25 13:18       ` Michael S. Tsirkin
2009-11-25 14:03         ` Paul Brook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0D2936.9000707@redhat.com \
    --to=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).