diff mbox

[v8,11/16] spapr: add pseries-2.4 machine type

Message ID 1429684100-13354-12-git-send-email-mdroth@linux.vnet.ibm.com
State New
Headers show

Commit Message

Michael Roth April 22, 2015, 6:28 a.m. UTC
Initially this is identifical to pseries-2.3. Subsequent patches will
use it to mask new 2.4 features by default.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/ppc/spapr.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

Comments

David Gibson April 28, 2015, 7:25 a.m. UTC | #1
On Wed, Apr 22, 2015 at 01:28:15AM -0500, Michael Roth wrote:
> Initially this is identifical to pseries-2.3. Subsequent patches will
> use it to mask new 2.4 features by default.
> 
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>

So, I've seen slightly different patches to add pseries-2.4 machine
type in at least three different series.  They all have commit
messages that only really make sense in the context of those series.

So, I've done my own and merged it to spapr-next.  You should no
longer need this when you rebase.
Michael Roth April 29, 2015, 6:11 a.m. UTC | #2
Quoting David Gibson (2015-04-28 02:25:51)
> On Wed, Apr 22, 2015 at 01:28:15AM -0500, Michael Roth wrote:
> > Initially this is identifical to pseries-2.3. Subsequent patches will
> > use it to mask new 2.4 features by default.
> > 
> > Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> 
> So, I've seen slightly different patches to add pseries-2.4 machine
> type in at least three different series.  They all have commit
> messages that only really make sense in the context of those series.
> 
> So, I've done my own and merged it to spapr-next.  You should no
> longer need this when you rebase.

Sounds good, but do I have the right tree for spapr-next? I didn't see it
here:

  git://github.com/dgibson/qemu.git spapr-next

> 
> -- 
> David Gibson                    | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
>                                 | _way_ _around_!
> http://www.ozlabs.org/~dgibson
David Gibson April 30, 2015, 1:03 a.m. UTC | #3
On Wed, Apr 29, 2015 at 01:11:52AM -0500, Michael Roth wrote:
> Quoting David Gibson (2015-04-28 02:25:51)
> > On Wed, Apr 22, 2015 at 01:28:15AM -0500, Michael Roth wrote:
> > > Initially this is identifical to pseries-2.3. Subsequent patches will
> > > use it to mask new 2.4 features by default.
> > > 
> > > Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> > 
> > So, I've seen slightly different patches to add pseries-2.4 machine
> > type in at least three different series.  They all have commit
> > messages that only really make sense in the context of those series.
> > 
> > So, I've done my own and merged it to spapr-next.  You should no
> > longer need this when you rebase.
> 
> Sounds good, but do I have the right tree for spapr-next? I didn't see it
> here:
> 
>   git://github.com/dgibson/qemu.git spapr-next

Oh, sorry, forgot to push it out.  Try again now.
diff mbox

Patch

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index c1e7281..6fab4d3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1862,7 +1862,7 @@  static void spapr_machine_2_3_class_init(ObjectClass *oc, void *data)
     mc->name = "pseries-2.3";
     mc->desc = "pSeries Logical Partition (PAPR compliant) v2.3";
     mc->alias = "pseries";
-    mc->is_default = 1;
+    mc->is_default = 0;
 }
 
 static const TypeInfo spapr_machine_2_3_info = {
@@ -1871,12 +1871,29 @@  static const TypeInfo spapr_machine_2_3_info = {
     .class_init    = spapr_machine_2_3_class_init,
 };
 
+static void spapr_machine_2_4_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->name = "pseries-2.4";
+    mc->desc = "pSeries Logical Partition (PAPR compliant) v2.4";
+    mc->alias = "pseries";
+    mc->is_default = 1;
+}
+
+static const TypeInfo spapr_machine_2_4_info = {
+    .name          = TYPE_SPAPR_MACHINE "2.4",
+    .parent        = TYPE_SPAPR_MACHINE,
+    .class_init    = spapr_machine_2_4_class_init,
+};
+
 static void spapr_machine_register_types(void)
 {
     type_register_static(&spapr_machine_info);
     type_register_static(&spapr_machine_2_1_info);
     type_register_static(&spapr_machine_2_2_info);
     type_register_static(&spapr_machine_2_3_info);
+    type_register_static(&spapr_machine_2_4_info);
 }
 
 type_init(spapr_machine_register_types)