[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibi

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x
Date: Thu, 09 Jul 2009 09:56:10 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

On 07/08/09 23:45, Anthony Liguori wrote:
Gerd Hoffmann wrote:
On 07/08/09 17:08, Mark McLoughlin wrote:
On Wed, 2009-07-08 at 16:09 +0200, Gerd Hoffmann wrote:
/usr/share/qemu/configs/pc -> /usr/share/qemu/configs/pc-0-11.dts
Doesn't work. Your virtio blk device isn't in there.

Right - I had assumed Anthony meant that such a config file would also
have details on the defaults used for devices which can be added to that

Could probably be done that way, but that wouldn't be different from a
global compat variable where the virtio-block-pci driver looks at.
We have different versions of devices.

We have options that we can tweak for devices. That doesn't mean they're
versioned. What the default set of options that is turned on for any
given device is determined by the machine type (since the machine init
is what creates the devices to start with).

The machine init doesn't create all devices. USB devices are created outside machine init today, and that will become more and more common.

I expect long-term we will end up with one of these two models:

  (1) - machine init creates just the bare devices, i.e. what is there
        when you specify just '-M pc'.  Either hardcoded or from
        machine config file.
      - generic code adds devices added by cmd line switches.

  (2) - command line switches insert additional devices into the bare
        (-M pc) device tree.
      - The virtual machine is created from that modified device tree.

I both cases it is not clear how the machine init / machine config will handle the versioning of the devices added by command line switches.

We could have each machine type register a list of default options. Using qdev properties that should be doable in a fairly generic way, like this:

virtio-blk-pci and virtio-console-pci get a "class" property. virtio-net-pci gets a "msi" property. ide-disk+cdrom gets a "fw-version" property (well, not yet, when being converted to qdev).

pc-0.10 could then register a list of default properties, i.e. something like

  "virtio-blk-pci"     => "class=0x??"
  "virtio-console-pci" => "class=0x??"
  "virtio-net-pci      => "msi=0"
  "ide-disk"           => "fw-version=0.10.0"

When creating devices qdev would apply them.

I can prototype that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]