Skip to contentSkip to conversation

ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat

PATCH Applied Amit Shah 2 participants 4 messages Feb 25, 2010 – Mar 6, 2010

lore
Share & tools
lore

Amit Shah

author
#0 lore raw

PATCH 1/2 ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat

Add a 0.12 machine type for compatibility with older versions. Mark the default one as 0.13.

---
 hw/ppc440_bamboo.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
hw/ppc440_bamboo.c +10 -1
index 1ab9872..aa9f594 100644
@@ -172,7 +172,15 @@ static void bamboo_init(ram_addr_t ram_size,
 }
 
 static QEMUMachine bamboo_machine = {
-    .name = "bamboo",
+    .name = "bamboo-0.13",
+    .alias = "bamboo",
+    .desc = "bamboo",
+    .init = bamboo_init,
+    .is_default = 1,
+};
+
+static QEMUMachine bamboo_machine_v0_12 = {
+    .name = "bamboo-0.12",
     .desc = "bamboo",
     .init = bamboo_init,
 };
@@ -180,6 +188,7 @@ static QEMUMachine bamboo_machine = {
 static void bamboo_machine_init(void)
 {
     qemu_register_machine(&bamboo_machine);
+    qemu_register_machine(&bamboo_machine_v0_12);
 }
 
 machine_init(bamboo_machine_init);
Signature · 1 line
1.6.2.5
author
#1 lore raw

PATCH 2/2 ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type

Disable the MULTIPORT feature and MSI vectors for the 0.12 machine types; those features are added only for 0.13 onwards.

---
 hw/ppc440_bamboo.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
hw/ppc440_bamboo.c +12 -0
index aa9f594..db96f14 100644
@@ -183,6 +183,18 @@ static QEMUMachine bamboo_machine_v0_12 = {
     .name = "bamboo-0.12",
     .desc = "bamboo",
     .init = bamboo_init,
+    .compat_props = (GlobalProperty[]) {
+        {
+            .driver   = "virtio-serial-pci",
+            .property = "max_nr_ports",
+            .value    = stringify(1),
+        },{
+            .driver   = "virtio-serial-pci",
+            .property = "vectors",
+            .value    = stringify(0),
+        },
+        { /* end of list */ }
+    },
 };
 
 static void bamboo_machine_init(void)
Signature · 1 line
1.6.2.5
#2 lore raw

Re: [Qemu-devel] [PATCH 2/2] ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type

Quoted 4 lines · Amit Shah

Disable the MULTIPORT feature and MSI vectors for the 0.12 machine types; those features are added only for 0.13 onwards.

Thanks, applied.

Quoted 33 lines
---
 hw/ppc440_bamboo.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
hw/ppc440_bamboo.c +12 -0
index aa9f594..db96f14 100644
@@ -183,6 +183,18 @@ static QEMUMachine bamboo_machine_v0_12 = {
     .name = "bamboo-0.12",
     .desc = "bamboo",
     .init = bamboo_init,
+    .compat_props = (GlobalProperty[]) {
+        {
+            .driver   = "virtio-serial-pci",
+            .property = "max_nr_ports",
+            .value    = stringify(1),
+        },{
+            .driver   = "virtio-serial-pci",
+            .property = "vectors",
+            .value    = stringify(0),
+        },
+        { /* end of list */ }
+    },
 };
 
 static void bamboo_machine_init(void)
Signature · 1 line
1.6.2.5
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
#3 lore raw
In reply to Amit Shah
Quoted 4 lines · Amit Shah

Add a 0.12 machine type for compatibility with older versions. Mark the default one as 0.13.

Thanks, applied.

Quoted 39 lines
---
 hw/ppc440_bamboo.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
hw/ppc440_bamboo.c +10 -1
index 1ab9872..aa9f594 100644
@@ -172,7 +172,15 @@ static void bamboo_init(ram_addr_t ram_size,
 }
 
 static QEMUMachine bamboo_machine = {
-    .name = "bamboo",
+    .name = "bamboo-0.13",
+    .alias = "bamboo",
+    .desc = "bamboo",
+    .init = bamboo_init,
+    .is_default = 1,
+};
+
+static QEMUMachine bamboo_machine_v0_12 = {
+    .name = "bamboo-0.12",
     .desc = "bamboo",
     .init = bamboo_init,
 };
@@ -180,6 +188,7 @@ static QEMUMachine bamboo_machine = {
 static void bamboo_machine_init(void)
 {
     qemu_register_machine(&bamboo_machine);
+    qemu_register_machine(&bamboo_machine_v0_12);
 }
 
 machine_init(bamboo_machine_init);
Signature · 1 line
1.6.2.5
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net