[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: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] pc: introduce 2.5 machine type |
Date: |
Fri, 21 Aug 2015 08:47:50 -0700 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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.
--
Eduardo
[Qemu-devel] [PATCH 4/6] virtio-pci: use wildcard mmio eventfd for 1.0 notification cap, Jason Wang, 2015/08/21