qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/6] pc: introduce 2.5 machine type


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH 1/6] pc: introduce 2.5 machine type
Date: Mon, 24 Aug 2015 13:45:36 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0


On 08/21/2015 11:47 PM, Eduardo Habkost wrote:
> On Fri, Aug 21, 2015 at 05:05:45PM +0800, Jason Wang wrote:
> [...]
>> > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>> > index a896624..2a7b7d9 100644
>> > --- a/hw/i386/pc_piix.c
>> > +++ b/hw/i386/pc_piix.c
>> > @@ -304,9 +304,15 @@ static void pc_init1(MachineState *machine)
>> >      }
>> >  }
>> >  
>> > +static void pc_compat_2_4(MachineState *machine)
>> > +{
>> > +}
>> > +
>> >  static void pc_compat_2_3(MachineState *machine)
>> >  {
>> >      PCMachineState *pcms = PC_MACHINE(machine);
>> > +
>> > +    pc_compat_2_4(machine);
>> >      savevm_skip_section_footers();
>> >      if (kvm_enabled()) {
>> >          pcms->smm = ON_OFF_AUTO_OFF;
>> > @@ -477,7 +483,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
>> >      m->hot_add_cpu = pc_hot_add_cpu;
>> >  }
>> >  
>> > -static void pc_i440fx_2_4_machine_options(MachineClass *m)
>> > +static void pc_i440fx_2_5_machine_options(MachineClass *m)
>> >  {
>> >      pc_i440fx_machine_options(m);
>> >      m->default_machine_opts = "firmware=bios-256k.bin";
>> > @@ -486,7 +492,18 @@ static void 
>> > pc_i440fx_2_4_machine_options(MachineClass *m)
>> >      m->is_default = 1;
>> >  }
>> >  
>> > -DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
>> > +DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", NULL,
>> > +                      pc_i440fx_2_5_machine_options)
>> > +
>> > +static void pc_i440fx_2_4_machine_options(MachineClass *m)
>> > +{
>> > +    pc_i440fx_machine_options(m);
>> > +    m->default_machine_opts = "firmware=bios-256k.bin";
>> > +    m->default_display = "std";
>> > +    SET_MACHINE_COMPAT(m, PC_COMPAT_2_4);
> Please don't duplicate pc_i440fx_2_5_machine_options() code here. Call
> pc_i440fx_2_5_machine_options() instead.
>
> Otherwise pc-2.4 will never inherit the compat settings from pc-2.8,
> pc-2.7, pc-2.6, when we create those machines.

Right, will fix this in V2.

Thanks



reply via email to

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