qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH v3 18/18] spapr: Add pseries-2.2 machine


From: Alexey Kardashevskiy
Subject: [Qemu-devel] [RFC PATCH v3 18/18] spapr: Add pseries-2.2 machine
Date: Fri, 29 Aug 2014 20:12:22 +1000

This defines new "pseries" machine version 2.2 and make it a default
machine.

Since "pseries-2.2" does not have "ddw" compat properties set to off and
"pseries" becomes an alias of "presies-2.2" instead of 2.1, this
effectively enables DDW on both emulated and VFIO PHBs.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
 hw/ppc/spapr.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 663cb75..9dfa96c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1681,8 +1681,7 @@ static void spapr_machine_2_1_class_init(ObjectClass *oc, 
void *data)
 
     mc->name = "pseries-2.1";
     mc->desc = "pSeries Logical Partition (PAPR compliant) v2.1";
-    mc->alias = "pseries";
-    mc->is_default = 1;
+    mc->is_default = 0;
     mc->compat_props = compat_props;
 }
 
@@ -1692,10 +1691,26 @@ static const TypeInfo spapr_machine_2_1_info = {
     .class_init    = spapr_machine_2_1_class_init,
 };
 
+static void spapr_machine_2_2_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+    mc->name = "pseries-2.2";
+    mc->desc = "pSeries Logical Partition (PAPR compliant) v2.2";
+    mc->alias = "pseries";
+    mc->is_default = 1;
+}
+
+static const TypeInfo spapr_machine_2_2_info = {
+    .name          = TYPE_SPAPR_MACHINE "2.2",
+    .parent        = TYPE_SPAPR_MACHINE,
+    .class_init    = spapr_machine_2_2_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_init(spapr_machine_register_types)
-- 
2.0.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]