@@ -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)
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 <aik@ozlabs.ru> --- hw/ppc/spapr.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)