diff mbox

[v2,1/9] s390x: add 2.6 compat machine

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

Commit Message

Cornelia Huck Jan. 7, 2016, 1:36 p.m. UTC
New qemu version, new machine.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

Comments

Christian Borntraeger Jan. 8, 2016, 12:22 p.m. UTC | #1
On 01/07/2016 02:36 PM, Cornelia Huck wrote:
> New qemu version, new machine.
> 
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

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


> ---
>  hw/s390x/s390-virtio-ccw.c | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 5a52ff2..8d7d04b 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -297,9 +297,7 @@ static void ccw_machine_2_5_class_init(ObjectClass *oc, void *data)
>  {
>      MachineClass *mc = MACHINE_CLASS(oc);
> 
> -    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 = {
> @@ -308,11 +306,27 @@ static const TypeInfo ccw_machine_2_5_info = {
>      .class_init    = ccw_machine_2_5_class_init,
>  };
> 
> +static void ccw_machine_2_6_class_init(ObjectClass *oc, void *data)
> +{
> +    MachineClass *mc = MACHINE_CLASS(oc);
> +
> +    mc->alias = "s390-ccw-virtio";
> +    mc->desc = "VirtIO-ccw based S390 machine v2.6";
> +    mc->is_default = 1;
> +}
> +
> +static const TypeInfo ccw_machine_2_6_info = {
> +    .name          = MACHINE_TYPE_NAME("s390-ccw-virtio-2.6"),
> +    .parent        = TYPE_S390_CCW_MACHINE,
> +    .class_init    = ccw_machine_2_6_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_register_static(&ccw_machine_2_6_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 5a52ff2..8d7d04b 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -297,9 +297,7 @@  static void ccw_machine_2_5_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
 
-    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 = {
@@ -308,11 +306,27 @@  static const TypeInfo ccw_machine_2_5_info = {
     .class_init    = ccw_machine_2_5_class_init,
 };
 
+static void ccw_machine_2_6_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->alias = "s390-ccw-virtio";
+    mc->desc = "VirtIO-ccw based S390 machine v2.6";
+    mc->is_default = 1;
+}
+
+static const TypeInfo ccw_machine_2_6_info = {
+    .name          = MACHINE_TYPE_NAME("s390-ccw-virtio-2.6"),
+    .parent        = TYPE_S390_CCW_MACHINE,
+    .class_init    = ccw_machine_2_6_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_register_static(&ccw_machine_2_6_info);
 }
 
 type_init(ccw_machine_register_types)