diff mbox

[for-2.5,1/8] s390x: add 2.5 compat s390-ccw-virtio machine

Message ID 1437400198-25382-2-git-send-email-cornelia.huck@de.ibm.com
State New
Headers show

Commit Message

Cornelia Huck July 20, 2015, 1:49 p.m. UTC
Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Comments

Christian Borntraeger July 20, 2015, 1:58 p.m. UTC | #1
Am 20.07.2015 um 15:49 schrieb Cornelia Huck:
> Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

for post 2.4
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>

> ---
>  hw/s390x/s390-virtio-ccw.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 4c51d1a..708763e 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -289,7 +289,6 @@ static void ccw_machine_2_4_class_init(ObjectClass *oc, void *data)
>      mc->name = "s390-ccw-virtio-2.4";
>      mc->alias = "s390-ccw-virtio";
>      mc->desc = "VirtIO-ccw based S390 machine v2.4";
> -    mc->is_default = 1;
>  }
> 
>  static const TypeInfo ccw_machine_2_4_info = {
> @@ -298,10 +297,27 @@ static const TypeInfo ccw_machine_2_4_info = {
>      .class_init    = ccw_machine_2_4_class_init,
>  };
> 
> +static void ccw_machine_2_5_class_init(ObjectClass *oc, void *data)
> +{
> +    MachineClass *mc = MACHINE_CLASS(oc);
> +
> +    mc->name = "s390-ccw-virtio-2.5";
> +    mc->alias = "s390-ccw-virtio";
> +    mc->desc = "VirtIO-ccw based S390 machine v2.5";
> +    mc->is_default = 1;
> +}
> +
> +static const TypeInfo ccw_machine_2_5_info = {
> +    .name          = TYPE_S390_CCW_MACHINE "2.5",
> +    .parent        = TYPE_S390_CCW_MACHINE,
> +    .class_init    = ccw_machine_2_5_class_init,
> +};
> +
>  static void ccw_machine_register_types(void)
>  {
>      type_register_static(&ccw_machine_info);
>      type_register_static(&ccw_machine_2_4_info);
> +    type_register_static(&ccw_machine_2_5_info);
>  }
> 
>  type_init(ccw_machine_register_types)
>
diff mbox

Patch

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 4c51d1a..708763e 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -289,7 +289,6 @@  static void ccw_machine_2_4_class_init(ObjectClass *oc, void *data)
     mc->name = "s390-ccw-virtio-2.4";
     mc->alias = "s390-ccw-virtio";
     mc->desc = "VirtIO-ccw based S390 machine v2.4";
-    mc->is_default = 1;
 }
 
 static const TypeInfo ccw_machine_2_4_info = {
@@ -298,10 +297,27 @@  static const TypeInfo ccw_machine_2_4_info = {
     .class_init    = ccw_machine_2_4_class_init,
 };
 
+static void ccw_machine_2_5_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->name = "s390-ccw-virtio-2.5";
+    mc->alias = "s390-ccw-virtio";
+    mc->desc = "VirtIO-ccw based S390 machine v2.5";
+    mc->is_default = 1;
+}
+
+static const TypeInfo ccw_machine_2_5_info = {
+    .name          = TYPE_S390_CCW_MACHINE "2.5",
+    .parent        = TYPE_S390_CCW_MACHINE,
+    .class_init    = ccw_machine_2_5_class_init,
+};
+
 static void ccw_machine_register_types(void)
 {
     type_register_static(&ccw_machine_info);
     type_register_static(&ccw_machine_2_4_info);
+    type_register_static(&ccw_machine_2_5_info);
 }
 
 type_init(ccw_machine_register_types)