On Di, 2014-10-28 at 10:37 +0000, Dr. David Alan Gilbert wrote: > * Gerd Hoffmann (kra...@redhat.com) wrote: > > This patch switches the default display from cirrus to vga > > for the new (qemu 2.2+) machine types. Old machines types > > stay as-is for compatibility reasons. > > > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > > --- > > hw/i386/pc_piix.c | 7 +++++-- > > hw/i386/pc_q35.c | 7 +++++-- > > 2 files changed, 10 insertions(+), 4 deletions(-) > > > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > > index 91a20cb..8637246 100644 > > --- a/hw/i386/pc_piix.c > > +++ b/hw/i386/pc_piix.c > > @@ -456,7 +456,8 @@ static void pc_xen_hvm_init(MachineState *machine) > > > > #define PC_I440FX_2_2_MACHINE_OPTIONS \ > > PC_I440FX_MACHINE_OPTIONS, \ > > - .default_machine_opts = "firmware=bios-256k.bin" > > + .default_machine_opts = "firmware=bios-256k.bin", \ > > + .default_display = "std" > > > > static QEMUMachine pc_i440fx_machine_v2_2 = { > > PC_I440FX_2_2_MACHINE_OPTIONS, > > @@ -466,7 +467,9 @@ static QEMUMachine pc_i440fx_machine_v2_2 = { > > .is_default = 1, > > }; > > > > -#define PC_I440FX_2_1_MACHINE_OPTIONS PC_I440FX_2_2_MACHINE_OPTIONS > > +#define PC_I440FX_2_1_MACHINE_OPTIONS \ > > + PC_I440FX_MACHINE_OPTIONS, \ > > + .default_machine_opts = "firmware=bios-256k.bin" > > I think the normal way to do this is the opposite of this; i.e. > make the display defaults be the new behaviour, then add the .default_display > = "cirrus" > to the v2_1 machine type, and everything below it will automatically inherit > it, and everything newer will just use the new default.
That is indeed the case for (device) compat properties, but not for QEMUMachine entries. default_display logic follows the way default_machine_opts works. cheers, Gerd