* [Qemu-devel] [PATCH for-2.4] pc: fix machine options for pc-i440fx-2.3 and below
@ 2015-07-09 20:28 Michael Roth
2015-07-11 19:28 ` Eduardo Habkost
0 siblings, 1 reply; 2+ messages in thread
From: Michael Roth @ 2015-07-09 20:28 UTC (permalink / raw
To: qemu-devel; +Cc: ehabkost, mst
Commit fddd179 introduced a mechanical change that initialized default
machine options using functions instead of macros. Prior to the change
options for pc-i440fx-2.3 were defined as:
#define PC_I440FX_MACHINE_OPTIONS \
PC_DEFAULT_MACHINE_OPTIONS, \
.family = "pc_piix", \
.desc = "Standard PC (i440FX + PIIX, 1996)", \
.hot_add_cpu = pc_hot_add_cpu
#define PC_I440FX_2_4_MACHINE_OPTIONS \
PC_I440FX_MACHINE_OPTIONS, \
.default_machine_opts = "firmware=bios-256k.bin", \
.default_display = "std", \
.alias = "pc", \
.is_default = 1
#define PC_I440FX_2_3_MACHINE_OPTIONS \
PC_I440FX_2_4_MACHINE_OPTIONS, \
.alias = NULL, \
.is_default = 0
However, as part of the conversion, the 2.3 definition was changed to
inherit directly from PC_I440FX_MACHINE_OPTIONS instead of the 2.4
options. As a result, the default pc bios for 2.3 and lower machines
has changed to the 128K version, which breaks 2.3 <> 2.4 migration.
Fix this by restoring the original defaults. 2.4 machine options have
not changed since the above commit, so no additional overrides are
needed.
Cc: ehabkost@redhat.com
Cc: mst@redhat.com
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
hw/i386/pc_piix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 8167b12..a896624 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -492,7 +492,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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.4] pc: fix machine options for pc-i440fx-2.3 and below
2015-07-09 20:28 [Qemu-devel] [PATCH for-2.4] pc: fix machine options for pc-i440fx-2.3 and below Michael Roth
@ 2015-07-11 19:28 ` Eduardo Habkost
0 siblings, 0 replies; 2+ messages in thread
From: Eduardo Habkost @ 2015-07-11 19:28 UTC (permalink / raw
To: Michael Roth; +Cc: qemu-devel, mst
On Thu, Jul 09, 2015 at 03:28:22PM -0500, Michael Roth wrote:
> Commit fddd179 introduced a mechanical change that initialized default
> machine options using functions instead of macros. Prior to the change
> options for pc-i440fx-2.3 were defined as:
>
> #define PC_I440FX_MACHINE_OPTIONS \
> PC_DEFAULT_MACHINE_OPTIONS, \
> .family = "pc_piix", \
> .desc = "Standard PC (i440FX + PIIX, 1996)", \
> .hot_add_cpu = pc_hot_add_cpu
>
> #define PC_I440FX_2_4_MACHINE_OPTIONS \
> PC_I440FX_MACHINE_OPTIONS, \
> .default_machine_opts = "firmware=bios-256k.bin", \
> .default_display = "std", \
> .alias = "pc", \
> .is_default = 1
>
> #define PC_I440FX_2_3_MACHINE_OPTIONS \
> PC_I440FX_2_4_MACHINE_OPTIONS, \
> .alias = NULL, \
> .is_default = 0
>
> However, as part of the conversion, the 2.3 definition was changed to
> inherit directly from PC_I440FX_MACHINE_OPTIONS instead of the 2.4
> options. As a result, the default pc bios for 2.3 and lower machines
> has changed to the 128K version, which breaks 2.3 <> 2.4 migration.
>
> Fix this by restoring the original defaults. 2.4 machine options have
> not changed since the above commit, so no additional overrides are
> needed.
>
> Cc: ehabkost@redhat.com
> Cc: mst@redhat.com
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
I submitted exactly the same fix on June 23:
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Date: Tue, 23 Jun 2015 14:00:51 -0300
Message-Id: <1435078851-10380-1-git-send-email-ehabkost@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: [Qemu-devel] [PATCH] pc: Fix resue of pc-i440fx-2.4 on pc-i440fx-2.3 machine_options
--
Eduardo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-11 19:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 20:28 [Qemu-devel] [PATCH for-2.4] pc: fix machine options for pc-i440fx-2.3 and below Michael Roth
2015-07-11 19:28 ` Eduardo Habkost
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.