On Mon, Sep 28, 2015 at 11:54:59AM +0200, Igor Mammedov wrote: [...] > static void pc_i440fx_machine_options(MachineClass *m) > { > + PCMachineClass *pcmc = PC_MACHINE_CLASS(m); > m->family = "pc_piix"; > m->desc = "Standard PC (i440FX + PIIX, 1996)"; > m->hot_add_cpu = pc_hot_add_cpu; > m->default_machine_opts = "firmware=bios-256k.bin"; > m->default_display = "std"; > + pcmc->inter_dimm_gap = true; [...] > static void pc_q35_machine_options(MachineClass *m) > { > + PCMachineClass *pcmc = PC_MACHINE_CLASS(m); > m->family = "pc_q35"; > m->desc = "Standard PC (Q35 + ICH9, 2009)"; > m->hot_add_cpu = pc_hot_add_cpu; > @@ -368,6 +369,7 @@ static void pc_q35_machine_options(MachineClass *m) > m->default_display = "std"; > m->no_floppy = 1; > m->no_tco = 0; > + pcmc->inter_dimm_gap = true; > }
You can initialize this at pc_machine_class_init() and avoid duplication between pc_i440fx_2_5_machine_options() and pc_q35_machine_options(). But this is not incorrect, so if you prefer it this way: Acked-by: Eduardo Habkost <ehabk...@redhat.com> -- Eduardo