qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] q35: Remove old machine versions


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] q35: Remove old machine versions
Date: Sun, 13 Sep 2015 12:28:45 +0300

On Fri, Sep 11, 2015 at 03:44:47PM -0300, Eduardo Habkost wrote:
> Ping?
> 
> So, what's the reason we are still keeping those old machines in the
> code?

Victor also wanted to clean out some very old machine types for
the PIIX, too.

But if someone created a machine with libvirt, these machine types
are now written in the XML. Failing to start guests isn't nice.

Maybe we could drop most of the compat code, but keep the
old machine types around with most visible changes (no_floppy? anything
else?). As we can't live migrate these older machine types,
minor guest visible changes aren't a big deal if they don't
break guest boot.

> 
> On Tue, Aug 18, 2015 at 04:11:42PM -0700, Eduardo Habkost wrote:
> > Migration with q35 was not possible before commit
> > 04329029a8c539eb5f75dcb6d8b016f0c53a031a, because q35 unconditionally 
> > creates
> > an ich9-ahci device, that was marked as unmigratable. So all q35 machines
> > before pc-q35-2.4 were unmigratable, and there's no point in keeping
> > compatibility code for them.
> > 
> > Remove all old pc-q35 machine classes and keep only pc-q35-2.4.
> > 
> > Signed-off-by: Eduardo Habkost <address@hidden>
> > ---
> >  hw/i386/pc_q35.c | 153 
> > -------------------------------------------------------
> >  1 file changed, 153 deletions(-)
> > 
> > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > index 4ee653e..e482f2f 100644
> > --- a/hw/i386/pc_q35.c
> > +++ b/hw/i386/pc_q35.c
> > @@ -272,60 +272,6 @@ static void pc_q35_init(MachineState *machine)
> >      }
> >  }
> >  
> > -static void pc_compat_2_3(MachineState *machine)
> > -{
> > -    PCMachineState *pcms = PC_MACHINE(machine);
> > -    savevm_skip_section_footers();
> > -    if (kvm_enabled()) {
> > -        pcms->smm = ON_OFF_AUTO_OFF;
> > -    }
> > -    global_state_set_optional();
> > -    savevm_skip_configuration();
> > -}
> > -
> > -static void pc_compat_2_2(MachineState *machine)
> > -{
> > -    pc_compat_2_3(machine);
> > -    machine->suppress_vmdesc = true;
> > -}
> > -
> > -static void pc_compat_2_1(MachineState *machine)
> > -{
> > -    PCMachineState *pcms = PC_MACHINE(machine);
> > -
> > -    pc_compat_2_2(machine);
> > -    pcms->enforce_aligned_dimm = false;
> > -    x86_cpu_compat_kvm_no_autodisable(FEAT_8000_0001_ECX, CPUID_EXT3_SVM);
> > -}
> > -
> > -static void pc_compat_2_0(MachineState *machine)
> > -{
> > -    pc_compat_2_1(machine);
> > -}
> > -
> > -static void pc_compat_1_7(MachineState *machine)
> > -{
> > -    pc_compat_2_0(machine);
> > -    option_rom_has_mr = true;
> > -    x86_cpu_compat_kvm_no_autoenable(FEAT_1_ECX, CPUID_EXT_X2APIC);
> > -}
> > -
> > -static void pc_compat_1_6(MachineState *machine)
> > -{
> > -    pc_compat_1_7(machine);
> > -    rom_file_has_mr = false;
> > -}
> > -
> > -static void pc_compat_1_5(MachineState *machine)
> > -{
> > -    pc_compat_1_6(machine);
> > -}
> > -
> > -static void pc_compat_1_4(MachineState *machine)
> > -{
> > -    pc_compat_1_5(machine);
> > -}
> > -
> >  #define DEFINE_Q35_MACHINE(suffix, name, compatfn, optionfn) \
> >      static void pc_init_##suffix(MachineState *machine) \
> >      { \
> > @@ -358,102 +304,3 @@ static void pc_q35_2_4_machine_options(MachineClass 
> > *m)
> >  
> >  DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL,
> >                     pc_q35_2_4_machine_options);
> > -
> > -
> > -static void pc_q35_2_3_machine_options(MachineClass *m)
> > -{
> > -    pc_q35_2_4_machine_options(m);
> > -    m->no_floppy = 0;
> > -    m->no_tco = 1;
> > -    m->alias = NULL;
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_2_3);
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v2_3, "pc-q35-2.3", pc_compat_2_3,
> > -                   pc_q35_2_3_machine_options);
> > -
> > -
> > -static void pc_q35_2_2_machine_options(MachineClass *m)
> > -{
> > -    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> > -    pc_q35_2_3_machine_options(m);
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_2_2);
> > -    pcmc->rsdp_in_ram = false;
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v2_2, "pc-q35-2.2", pc_compat_2_2,
> > -                   pc_q35_2_2_machine_options);
> > -
> > -
> > -static void pc_q35_2_1_machine_options(MachineClass *m)
> > -{
> > -    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> > -    pc_q35_2_2_machine_options(m);
> > -    m->default_display = NULL;
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_2_1);
> > -    pcmc->smbios_uuid_encoded = false;
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v2_1, "pc-q35-2.1", pc_compat_2_1,
> > -                   pc_q35_2_1_machine_options);
> > -
> > -
> > -static void pc_q35_2_0_machine_options(MachineClass *m)
> > -{
> > -    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> > -    pc_q35_2_1_machine_options(m);
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_2_0);
> > -    pcmc->has_reserved_memory = false;
> > -    pcmc->smbios_legacy_mode = true;
> > -    pcmc->acpi_data_size = 0x10000;
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v2_0, "pc-q35-2.0", pc_compat_2_0,
> > -                   pc_q35_2_0_machine_options);
> > -
> > -
> > -static void pc_q35_1_7_machine_options(MachineClass *m)
> > -{
> > -    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> > -    pc_q35_2_0_machine_options(m);
> > -    m->default_machine_opts = NULL;
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_1_7);
> > -    pcmc->smbios_defaults = false;
> > -    pcmc->gigabyte_align = false;
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v1_7, "pc-q35-1.7", pc_compat_1_7,
> > -                   pc_q35_1_7_machine_options);
> > -
> > -
> > -static void pc_q35_1_6_machine_options(MachineClass *m)
> > -{
> > -    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> > -    pc_q35_machine_options(m);
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_1_6);
> > -    pcmc->has_acpi_build = false;
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v1_6, "pc-q35-1.6", pc_compat_1_6,
> > -                   pc_q35_1_6_machine_options);
> > -
> > -
> > -static void pc_q35_1_5_machine_options(MachineClass *m)
> > -{
> > -    pc_q35_1_6_machine_options(m);
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_1_5);
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v1_5, "pc-q35-1.5", pc_compat_1_5,
> > -                   pc_q35_1_5_machine_options);
> > -
> > -
> > -static void pc_q35_1_4_machine_options(MachineClass *m)
> > -{
> > -    pc_q35_1_5_machine_options(m);
> > -    m->hot_add_cpu = NULL;
> > -    SET_MACHINE_COMPAT(m, PC_COMPAT_1_4);
> > -}
> > -
> > -DEFINE_Q35_MACHINE(v1_4, "pc-q35-1.4", pc_compat_1_4,
> > -                   pc_q35_1_4_machine_options);
> > -- 
> > 2.1.0
> > 
> > 
> 
> -- 
> Eduardo



reply via email to

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