Hi,

> Thanks again for any feedback and comments (or for just applying the patch) !

Series looks good to me.

/me wonders though how you've tested the final revision and the compat
stuff.  Patch #6 doesn't actually add a new machine type where the
non-legacy mode is active ...

Incremental patch attached.

I'll go wait for a few days for additional feedback, then go squash the
fix into patch #6 and send out a pull request.

cheers,
  Gerd

>From fa45a8993706fe7c31a5a2f38f5c90d061275203 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kra...@redhat.com>
Date: Wed, 23 Apr 2014 11:56:32 +0200
Subject: [PATCH] 2.1 machine type fixup

---
 hw/i386/pc_piix.c | 11 +++++++++--
 hw/i386/pc_q35.c  |  9 ++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index f3e2c4e..7de9507 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -400,12 +400,18 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
     PC_I440FX_MACHINE_OPTIONS,                                  \
     .default_machine_opts = "firmware=bios-256k.bin"
 
+static QEMUMachine pc_i440fx_machine_v2_1 = {
+    PC_I440FX_2_0_MACHINE_OPTIONS,
+    .name = "pc-i440fx-2.1",
+    .alias = "pc",
+    .init = pc_init_pci,
+    .is_default = 1,
+};
+
 static QEMUMachine pc_i440fx_machine_v2_0 = {
     PC_I440FX_2_0_MACHINE_OPTIONS,
     .name = "pc-i440fx-2.0",
-    .alias = "pc",
     .init = pc_init_pci_2_0,
-    .is_default = 1,
 };
 
 #define PC_I440FX_1_7_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS
@@ -830,6 +836,7 @@ static QEMUMachine xenfv_machine = {
 
 static void pc_machine_init(void)
 {
+    qemu_register_machine(&pc_i440fx_machine_v2_1);
     qemu_register_machine(&pc_i440fx_machine_v2_0);
     qemu_register_machine(&pc_i440fx_machine_v1_7);
     qemu_register_machine(&pc_i440fx_machine_v1_6);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 2b565cb..4c57b91 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -314,10 +314,16 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
     PC_Q35_MACHINE_OPTIONS,                             \
     .default_machine_opts = "firmware=bios-256k.bin"
 
+static QEMUMachine pc_q35_machine_v2_1 = {
+    PC_Q35_2_0_MACHINE_OPTIONS,
+    .name = "pc-q35-2.1",
+    .alias = "q35",
+    .init = pc_q35_init,
+};
+
 static QEMUMachine pc_q35_machine_v2_0 = {
     PC_Q35_2_0_MACHINE_OPTIONS,
     .name = "pc-q35-2.0",
-    .alias = "q35",
     .init = pc_q35_init_2_0,
 };
 
@@ -371,6 +377,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {
 
 static void pc_q35_machine_init(void)
 {
+    qemu_register_machine(&pc_q35_machine_v2_1);
     qemu_register_machine(&pc_q35_machine_v2_0);
     qemu_register_machine(&pc_q35_machine_v1_7);
     qemu_register_machine(&pc_q35_machine_v1_6);
-- 
1.8.3.1

Reply via email to