From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOUft-0006e5-Bn for qemu-devel@nongnu.org; Wed, 08 Jul 2009 06:46:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOUfo-0006YH-A5 for qemu-devel@nongnu.org; Wed, 08 Jul 2009 06:46:52 -0400 Received: from [199.232.76.173] (port=44797 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOUfn-0006Y4-VI for qemu-devel@nongnu.org; Wed, 08 Jul 2009 06:46:48 -0400 Received: from mx2.redhat.com ([66.187.237.31]:60199) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOUfn-0007FJ-Dm for qemu-devel@nongnu.org; Wed, 08 Jul 2009 06:46:47 -0400 Subject: Re: [Qemu-devel] [PATCH 3/3] Add a pc-0-10 machine type for compatibility with 0.10.x From: Mark McLoughlin In-Reply-To: <4A5338FC.9030301@redhat.com> References: <1244821292.30522.56.camel@blaa> <4A327E4A.7010300@codemonkey.ws> <1244825303.26769.19.camel@blaa> <20090614095016.GA7560@redhat.com> <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> Content-Type: text/plain Date: Wed, 08 Jul 2009 11:46:24 +0100 Message-Id: <1247049984.3270.52.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org On Tue, 2009-07-07 at 15:01 +0300, Avi Kivity wrote: > On 07/07/2009 02:10 PM, Mark McLoughlin wrote: > > Add a pc-0-10 machine type to allow a pc machine to be created with > > virtio block and console devices compatibilty with qemu-0.10.x. > > > > Signed-off-by: Mark McLoughlin > > --- > > hw/pc.c | 46 ++++++++++++++++++++++++++++++++++++++++------ > > 1 files changed, 40 insertions(+), 6 deletions(-) > > > > diff --git a/hw/pc.c b/hw/pc.c > > index 553ba5c..9025f78 100644 > > --- a/hw/pc.c > > +++ b/hw/pc.c > > @@ -1084,9 +1084,12 @@ static CPUState *pc_new_cpu(const char *cpu_model) > > /* PC hardware initialisation */ > > static void pc_init1(ram_addr_t ram_size, > > const char *boot_device, > > - const char *kernel_filename, const char *kernel_cmdline, > > + const char *kernel_filename, > > + const char *kernel_cmdline, > > const char *initrd_filename, > > - int pci_enabled, const char *cpu_model) > > + const char *cpu_model, > > + int pci_enabled, > > + int compat_0_10) > > > > > compat_level ( == COMPAT_DEFAULT, COMPAT_0_10 ). > > > +static QEMUMachine pc_0_10_machine = { > > + .name = "pc-0-10", > > + .desc = "Standard PC compatibile with qemu 0.10.x", > > > > "compatible" > > > + .init = pc_init_pci_0_10, > > + .max_cpus = 255, > > > > .compat_level = COMPAT_0_10, Yep, this would be nice. To do it, I'd add a machine_compat_level enum member to QEMUMachine and pass a QEMUMachine pointer to QEMUMachineInitFunc. Happy to do that, and fix up the >50 affected machine types, but before going to that bother I'd prefer to first get some indication that the general approach would be accepted :-) Following up with a slightly better patch, but still confined to hw/pc.c Cheers, Mark.