From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOcUu-0001VT-LX for qemu-devel@nongnu.org; Wed, 08 Jul 2009 15:08:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOcUq-0001Ln-3o for qemu-devel@nongnu.org; Wed, 08 Jul 2009 15:08:04 -0400 Received: from [199.232.76.173] (port=45605 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOcUp-0001LT-TG for qemu-devel@nongnu.org; Wed, 08 Jul 2009 15:07:59 -0400 Received: from mx2.redhat.com ([66.187.237.31]:35903) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOcUp-0004us-E1 for qemu-devel@nongnu.org; Wed, 08 Jul 2009 15:07:59 -0400 Message-ID: <4A54EE87.2000508@redhat.com> Date: Wed, 08 Jul 2009 21:07:51 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/3 v2] Add a pc-0-10 machine type for compatibility with 0.10.x References: <1244821292.30522.56.camel@blaa> <1245056916.6891.31.camel@blaa> <4A3613EC.6030608@redhat.com> <20090615103249.GB6351@redhat.com> <4A363012.8050409@redhat.com> <20090615114858.GG6351@redhat.com> <4A3636FA.1040609@redhat.com> <20090615124101.GH6351@redhat.com> <4A364381.401@redhat.com> <4A364401.6010500@codemonkey.ws> <4A3647FB.9010808@redhat.com> <4A364B53.9080007@codemonkey.ws> <4A364FE0.40204@redhat.com> <4A3651EB.3070204@codemonkey.ws> <4A36555A.4090303@redhat.com> <4A3659A0.3050108@codemonkey.ws> <4A366348.1030202@redhat.com> <1245083229.3222.103.camel@blaa> <4A368F12.2090504@codemonkey.ws> <1246964898.2836.38.camel@blaa> <1246964950.2836.39.camel@blaa> <1246964998.2836.40.camel@blaa> <1246965054.2836.41.camel@blaa> <4A5338FC.9030301@redhat.com> <1247049984.3270.52.camel@blaa> <1247050083.3270.54.camel@blaa> <4A54986D.301@redhat.com> <4A54A2B0.6050605@codemonk! ey.ws> <4A54A895.5090501@redhat.com> <1247065728.3270.65.camel@blaa> In-Reply-To: <1247065728.3270.65.camel@blaa> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: Avi Kivity , qemu-devel@nongnu.org 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-0-10.dts >>> /usr/share/qemu/configs/pc-0-11.dts >>> /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 > machine. 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 should model them that way. I'd start with a global compat_level. We might switch to a per-device compat level later if there is a need. With qdev it should be easy once the devices are converted. I think it will be much more better maintainable than adding new devices because there is a standardized way to switch a driver to an older version instead of having to know "oh, that driver has these compat versions, but this one hasn't". virtio blk+console will switch class for compat_level < 0.11. virtio net will disable msi for compat_level < 0.11. ide might adapt the firmware version for the virtual disk/cdrom to the compat level. Everybody else is free to ignore it. Note that different machine config versions might make sense nevertheless in case the set of (default) devices changes. i.e. if we turn on usb by default we might add a compat machine type without usb. cheers, Gerd