Skip to contentSkip to conversation

pc: Fix resue of pc-i440fx-2.4 on pc-i440fx-2.3 machine_options

PATCH In review Eduardo Habkost 4 participants 5 messages Jun 23, 2015 – Jul 7, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pc: Fix resue of pc-i440fx-2.4 on pc-i440fx-2.3 machine_options

On commit fddd179ab962f6f78a8493742e1068d6a620e059, I broke the chaining of *_machine_options() functions on pc-i440fx-2.3, at:

-#define PC_I440FX_2_3_MACHINE_OPTIONS \

  -    PC_I440FX_2_4_MACHINE_OPTIONS, \
  -    .alias = NULL, \
  -    .is_default = 0
  +static void pc_i440fx_2_3_machine_options(QEMUMachine *m)
  +{
  +    pc_i440fx_machine_options(m);
  +    m->alias = NULL;
  +    m->is_default = 0;

+}

I have replaced PC_I440FX_2_4_MACHINE_OPTIONS with a pc_i440fx_machine_options() call, instead of calling pc_i440fx_2_4_machine_options(). This broke the setting of default_machine_opts and default_display on pc-i440fx-{2.0,2,1,2.2,2.3}.

Fix this by making pc_i440fx_2_3_machine_options() reuse pc_i440fx_2_4_machine_options().

---
 hw/i386/pc_piix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc_piix.c +1 -1
index e142f75..b335856 100644
@@ -486,7 +486,7 @@ DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
 
 static void pc_i440fx_2_3_machine_options(MachineClass *m)
 {
-    pc_i440fx_machine_options(m);
+    pc_i440fx_2_4_machine_options(m);
     m->alias = NULL;
     m->is_default = 0;
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_3);
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 34 lines · Eduardo Habkost

On commit fddd179ab962f6f78a8493742e1068d6a620e059, I broke the chaining of *_machine_options() functions on pc-i440fx-2.3, at:

-#define PC_I440FX_2_3_MACHINE_OPTIONS \

  -    PC_I440FX_2_4_MACHINE_OPTIONS, \
  -    .alias = NULL, \
  -    .is_default = 0
  +static void pc_i440fx_2_3_machine_options(QEMUMachine *m)
  +{
  +    pc_i440fx_machine_options(m);
  +    m->alias = NULL;
  +    m->is_default = 0;

+}

I have replaced PC_I440FX_2_4_MACHINE_OPTIONS with a pc_i440fx_machine_options() call, instead of calling pc_i440fx_2_4_machine_options(). This broke the setting of default_machine_opts and default_display on pc-i440fx-{2.0,2,1,2.2,2.3}.

Fix this by making pc_i440fx_2_3_machine_options() reuse pc_i440fx_2_4_machine_options().

---
 hw/i386/pc_piix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc_piix.c +0 -0
index e142f75..b335856 100644

hw/i386/pc_piix.c DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL, · line 492

Quoted 8 lines
hw/i386/pc_piix.c +1 -1
@@ -486,7 +486,7 @@ DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
 
 static void pc_i440fx_2_3_machine_options(MachineClass *m)
 {
-    pc_i440fx_machine_options(m);
+    pc_i440fx_2_4_machine_options(m);
     m->alias = NULL;
     m->is_default = 0;
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_3);

looks good to me

#2 lore raw
In reply to Eduardo Habkost
Quoted 19 lines · * Eduardo Habkost ([email protected]) wrote:

On commit fddd179ab962f6f78a8493742e1068d6a620e059, I broke the chaining of *_machine_options() functions on pc-i440fx-2.3, at:

-#define PC_I440FX_2_3_MACHINE_OPTIONS \

  -    PC_I440FX_2_4_MACHINE_OPTIONS, \
  -    .alias = NULL, \
  -    .is_default = 0
  +static void pc_i440fx_2_3_machine_options(QEMUMachine *m)
  +{
  +    pc_i440fx_machine_options(m);
  +    m->alias = NULL;
  +    m->is_default = 0;

+}

I have replaced PC_I440FX_2_4_MACHINE_OPTIONS with a pc_i440fx_machine_options() call, instead of calling pc_i440fx_2_4_machine_options(). This broke the setting of default_machine_opts and default_display on pc-i440fx-{2.0,2,1,2.2,2.3}.

Quoted 5 lines

Fix this by making pc_i440fx_2_3_machine_options() reuse pc_i440fx_2_4_machine_options().

Thanks, that does solve that one.
(Unfortunately VGA memory size is still incompatible somewhere between 2.1 and head by default; but I think that's separate).

Dave

Quoted 20 lines
---
 hw/i386/pc_piix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc_piix.c +1 -1
index e142f75..b335856 100644
@@ -486,7 +486,7 @@ DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
 
 static void pc_i440fx_2_3_machine_options(MachineClass *m)
 {
-    pc_i440fx_machine_options(m);
+    pc_i440fx_2_4_machine_options(m);
     m->alias = NULL;
     m->is_default = 0;
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_3);
Signature · 1 line
2.1.0

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#3 lore raw
In reply to Eduardo Habkost

s/resue/reuse/

Looks okay otherwise.

Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)
#4 lore raw
In reply to Eduardo Habkost

Michael, is this going to be applied to your tree?

Quoted 45 lines · Eduardo Habkost

On commit fddd179ab962f6f78a8493742e1068d6a620e059, I broke the chaining of *_machine_options() functions on pc-i440fx-2.3, at:

-#define PC_I440FX_2_3_MACHINE_OPTIONS \

  -    PC_I440FX_2_4_MACHINE_OPTIONS, \
  -    .alias = NULL, \
  -    .is_default = 0
  +static void pc_i440fx_2_3_machine_options(QEMUMachine *m)
  +{
  +    pc_i440fx_machine_options(m);
  +    m->alias = NULL;
  +    m->is_default = 0;

+}

I have replaced PC_I440FX_2_4_MACHINE_OPTIONS with a pc_i440fx_machine_options() call, instead of calling pc_i440fx_2_4_machine_options(). This broke the setting of default_machine_opts and default_display on pc-i440fx-{2.0,2,1,2.2,2.3}.

Fix this by making pc_i440fx_2_3_machine_options() reuse pc_i440fx_2_4_machine_options().

---
 hw/i386/pc_piix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc_piix.c +1 -1
index e142f75..b335856 100644
@@ -486,7 +486,7 @@ DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
 
 static void pc_i440fx_2_3_machine_options(MachineClass *m)
 {
-    pc_i440fx_machine_options(m);
+    pc_i440fx_2_4_machine_options(m);
     m->alias = NULL;
     m->is_default = 0;
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_3);
Signature · 1 line
2.1.0
Signature · 1 line
Eduardo