diff mbox

[for-2.9,1/5] pseries: Add pseries-2.9 machine type

Message ID 20161209022314.14399-2-david@gibson.dropbear.id.au
State New
Headers show

Commit Message

David Gibson Dec. 9, 2016, 2:23 a.m. UTC
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/spapr.c      | 23 +++++++++++++++++++++--
 include/hw/compat.h |  3 +++
 2 files changed, 24 insertions(+), 2 deletions(-)

Comments

Thomas Huth Dec. 9, 2016, 7:59 a.m. UTC | #1
On 09.12.2016 03:23, David Gibson wrote:
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  hw/ppc/spapr.c      | 23 +++++++++++++++++++++--
>  include/hw/compat.h |  3 +++
>  2 files changed, 24 insertions(+), 2 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>
Laurent Vivier Dec. 9, 2016, 1:25 p.m. UTC | #2
On 09/12/2016 03:23, David Gibson wrote:
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  hw/ppc/spapr.c      | 23 +++++++++++++++++++++--
>  include/hw/compat.h |  3 +++
>  2 files changed, 24 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index cfadc46..0f25e83 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2761,18 +2761,37 @@ static const TypeInfo spapr_machine_info = {
>      type_init(spapr_machine_register_##suffix)
>  
>  /*
> + * pseries-2.9
> + */
> +static void spapr_machine_2_9_instance_options(MachineState *machine)
> +{
> +}
> +
> +static void spapr_machine_2_9_class_options(MachineClass *mc)
> +{
> +    /* Defaults for the latest behaviour inherited from the base class */
> +}
> +
> +DEFINE_SPAPR_MACHINE(2_9, "2.9", true);
> +
> +/*
>   * pseries-2.8
>   */
> +#define SPAPR_COMPAT_2_8                            \
> +    HW_COMPAT_2_8
> +
>  static void spapr_machine_2_8_instance_options(MachineState *machine)
>  {
> +    spapr_machine_2_9_instance_options(machine);
>  }
>  
>  static void spapr_machine_2_8_class_options(MachineClass *mc)
>  {
> -    /* Defaults for the latest behaviour inherited from the base class */
> +    spapr_machine_2_9_class_options(mc);
> +    SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_8);
>  }
>  
> -DEFINE_SPAPR_MACHINE(2_8, "2.8", true);
> +DEFINE_SPAPR_MACHINE(2_8, "2.8", false);
>  
>  /*
>   * pseries-2.7
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index 0f06e11..f8b8354 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -1,6 +1,9 @@
>  #ifndef HW_COMPAT_H
>  #define HW_COMPAT_H
>  
> +#define HW_COMPAT_2_8 \
> +    /* empty */
> +
>  #define HW_COMPAT_2_7 \
>      {\
>          .driver   = "virtio-pci",\
> 
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
diff mbox

Patch

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index cfadc46..0f25e83 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2761,18 +2761,37 @@  static const TypeInfo spapr_machine_info = {
     type_init(spapr_machine_register_##suffix)
 
 /*
+ * pseries-2.9
+ */
+static void spapr_machine_2_9_instance_options(MachineState *machine)
+{
+}
+
+static void spapr_machine_2_9_class_options(MachineClass *mc)
+{
+    /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(2_9, "2.9", true);
+
+/*
  * pseries-2.8
  */
+#define SPAPR_COMPAT_2_8                            \
+    HW_COMPAT_2_8
+
 static void spapr_machine_2_8_instance_options(MachineState *machine)
 {
+    spapr_machine_2_9_instance_options(machine);
 }
 
 static void spapr_machine_2_8_class_options(MachineClass *mc)
 {
-    /* Defaults for the latest behaviour inherited from the base class */
+    spapr_machine_2_9_class_options(mc);
+    SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_8);
 }
 
-DEFINE_SPAPR_MACHINE(2_8, "2.8", true);
+DEFINE_SPAPR_MACHINE(2_8, "2.8", false);
 
 /*
  * pseries-2.7
diff --git a/include/hw/compat.h b/include/hw/compat.h
index 0f06e11..f8b8354 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -1,6 +1,9 @@ 
 #ifndef HW_COMPAT_H
 #define HW_COMPAT_H
 
+#define HW_COMPAT_2_8 \
+    /* empty */
+
 #define HW_COMPAT_2_7 \
     {\
         .driver   = "virtio-pci",\