[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v8 11/16] spapr: add pseries-2.4 machine type
From: |
Michael Roth |
Subject: |
[Qemu-ppc] [PATCH v8 11/16] spapr: add pseries-2.4 machine type |
Date: |
Wed, 22 Apr 2015 01:28:15 -0500 |
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 <address@hidden>
---
hw/ppc/spapr.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
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)
--
1.9.1