From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTkZl-0003HA-Mw for qemu-devel@nongnu.org; Mon, 24 Aug 2015 01:45:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTkZi-0005hL-Ez for qemu-devel@nongnu.org; Mon, 24 Aug 2015 01:45:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTkZi-0005hH-9K for qemu-devel@nongnu.org; Mon, 24 Aug 2015 01:45:42 -0400 Message-ID: <55DAAF80.4040301@redhat.com> Date: Mon, 24 Aug 2015 13:45:36 +0800 From: Jason Wang MIME-Version: 1.0 References: <1440147950-1178-1-git-send-email-jasowang@redhat.com> <1440147950-1178-2-git-send-email-jasowang@redhat.com> <20150821154750.GB5575@thinpad.lan.raisama.net> In-Reply-To: <20150821154750.GB5575@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/6] pc: introduce 2.5 machine type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Paolo Bonzini , mst@redhat.com, qemu-devel@nongnu.org, Richard Henderson 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