qemu-devel
[Top][All Lists]
Advanced

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

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


From: Mark McLoughlin
Subject: Re: [Qemu-devel] [PATCH 3/3] Add a pc-0-10 machine type for compatibility with 0.10.x
Date: Wed, 08 Jul 2009 11:46:24 +0100

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<address@hidden>
> > ---
> >   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.





reply via email to

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