diff mbox series

[v4,1/5] hw, spapr: add 6.2 compat pseries machine

Message ID 20210827092455.125411-2-danielhb413@gmail.com (mailing list archive)
State New, archived
Headers show
Series pSeries FORM2 affinity support | expand

Commit Message

Daniel Henrique Barboza Aug. 27, 2021, 9:24 a.m. UTC
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 hw/core/machine.c   |  3 +++
 hw/ppc/spapr.c      | 15 +++++++++++++--
 include/hw/boards.h |  3 +++
 3 files changed, 19 insertions(+), 2 deletions(-)

Comments

Greg Kurz Aug. 30, 2021, 7:34 a.m. UTC | #1
On Fri, 27 Aug 2021 06:24:51 -0300
Daniel Henrique Barboza <danielhb413@gmail.com> wrote:

> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---

We usually introduce the compat machine types for all archs in a
single patch. One was already posted for 6.2 :

https://patchwork.ozlabs.org/project/qemu-devel/patch/20210823122804.7692-7-wangyanan55@huawei.com/


>  hw/core/machine.c   |  3 +++
>  hw/ppc/spapr.c      | 15 +++++++++++++--
>  include/hw/boards.h |  3 +++
>  3 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 54e040587d..067f42b528 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -37,6 +37,9 @@
>  #include "hw/virtio/virtio.h"
>  #include "hw/virtio/virtio-pci.h"
>  
> +GlobalProperty hw_compat_6_1[] = {};
> +const size_t hw_compat_6_1_len = G_N_ELEMENTS(hw_compat_6_1);
> +
>  GlobalProperty hw_compat_6_0[] = {
>      { "gpex-pcihost", "allow-unmapped-accesses", "false" },
>      { "i8042", "extended-state", "false"},
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 81699d4f8b..d39fd4e644 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -4685,15 +4685,26 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
>      }                                                                \
>      type_init(spapr_machine_register_##suffix)
>  
> +/*
> + * pseries-6.2
> + */
> +static void spapr_machine_6_2_class_options(MachineClass *mc)
> +{
> +    /* Defaults for the latest behaviour inherited from the base class */
> +}
> +
> +DEFINE_SPAPR_MACHINE(6_2, "6.2", true);
> +
>  /*
>   * pseries-6.1
>   */
>  static void spapr_machine_6_1_class_options(MachineClass *mc)
>  {
> -    /* Defaults for the latest behaviour inherited from the base class */
> +    spapr_machine_6_2_class_options(mc);
> +    compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
>  }
>  
> -DEFINE_SPAPR_MACHINE(6_1, "6.1", true);
> +DEFINE_SPAPR_MACHINE(6_1, "6.1", false);
>  
>  /*
>   * pseries-6.0
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index accd6eff35..463a5514f9 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -353,6 +353,9 @@ struct MachineState {
>      } \
>      type_init(machine_initfn##_register_types)
>  
> +extern GlobalProperty hw_compat_6_1[];
> +extern const size_t hw_compat_6_1_len;
> +
>  extern GlobalProperty hw_compat_6_0[];
>  extern const size_t hw_compat_6_0_len;
>
Daniel Henrique Barboza Aug. 30, 2021, 6:24 p.m. UTC | #2
On 8/30/21 4:34 AM, Greg Kurz wrote:
> On Fri, 27 Aug 2021 06:24:51 -0300
> Daniel Henrique Barboza <danielhb413@gmail.com> wrote:
> 
>> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
>> ---
> 
> We usually introduce the compat machine types for all archs in a
> single patch. One was already posted for 6.2 :
> 
> https://patchwork.ozlabs.org/project/qemu-devel/patch/20210823122804.7692-7-wangyanan55@huawei.com/

We can discard this patch. The rest of the series will play ball with
the official 6.2 machine type patch later on.


Thanks,


Daniel

> 
> 
>>   hw/core/machine.c   |  3 +++
>>   hw/ppc/spapr.c      | 15 +++++++++++++--
>>   include/hw/boards.h |  3 +++
>>   3 files changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/core/machine.c b/hw/core/machine.c
>> index 54e040587d..067f42b528 100644
>> --- a/hw/core/machine.c
>> +++ b/hw/core/machine.c
>> @@ -37,6 +37,9 @@
>>   #include "hw/virtio/virtio.h"
>>   #include "hw/virtio/virtio-pci.h"
>>   
>> +GlobalProperty hw_compat_6_1[] = {};
>> +const size_t hw_compat_6_1_len = G_N_ELEMENTS(hw_compat_6_1);
>> +
>>   GlobalProperty hw_compat_6_0[] = {
>>       { "gpex-pcihost", "allow-unmapped-accesses", "false" },
>>       { "i8042", "extended-state", "false"},
>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
>> index 81699d4f8b..d39fd4e644 100644
>> --- a/hw/ppc/spapr.c
>> +++ b/hw/ppc/spapr.c
>> @@ -4685,15 +4685,26 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
>>       }                                                                \
>>       type_init(spapr_machine_register_##suffix)
>>   
>> +/*
>> + * pseries-6.2
>> + */
>> +static void spapr_machine_6_2_class_options(MachineClass *mc)
>> +{
>> +    /* Defaults for the latest behaviour inherited from the base class */
>> +}
>> +
>> +DEFINE_SPAPR_MACHINE(6_2, "6.2", true);
>> +
>>   /*
>>    * pseries-6.1
>>    */
>>   static void spapr_machine_6_1_class_options(MachineClass *mc)
>>   {
>> -    /* Defaults for the latest behaviour inherited from the base class */
>> +    spapr_machine_6_2_class_options(mc);
>> +    compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
>>   }
>>   
>> -DEFINE_SPAPR_MACHINE(6_1, "6.1", true);
>> +DEFINE_SPAPR_MACHINE(6_1, "6.1", false);
>>   
>>   /*
>>    * pseries-6.0
>> diff --git a/include/hw/boards.h b/include/hw/boards.h
>> index accd6eff35..463a5514f9 100644
>> --- a/include/hw/boards.h
>> +++ b/include/hw/boards.h
>> @@ -353,6 +353,9 @@ struct MachineState {
>>       } \
>>       type_init(machine_initfn##_register_types)
>>   
>> +extern GlobalProperty hw_compat_6_1[];
>> +extern const size_t hw_compat_6_1_len;
>> +
>>   extern GlobalProperty hw_compat_6_0[];
>>   extern const size_t hw_compat_6_0_len;
>>   
>
Peter Maydell Aug. 30, 2021, 6:32 p.m. UTC | #3
On Mon, 30 Aug 2021 at 08:36, Greg Kurz <groug@kaod.org> wrote:
>
> On Fri, 27 Aug 2021 06:24:51 -0300
> Daniel Henrique Barboza <danielhb413@gmail.com> wrote:
>
> > Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> > ---
>
> We usually introduce the compat machine types for all archs in a
> single patch. One was already posted for 6.2 :
>
> https://patchwork.ozlabs.org/project/qemu-devel/patch/20210823122804.7692-7-wangyanan55@huawei.com/

Would somebody like to fish that patch out of the unrelated large
series it was posted in so that it can get into the tree sooner?

-- PMM
Yanan Wang Aug. 31, 2021, 2:01 a.m. UTC | #4
Hi,

On 2021/8/31 2:32, Peter Maydell wrote:
> On Mon, 30 Aug 2021 at 08:36, Greg Kurz <groug@kaod.org> wrote:
>> On Fri, 27 Aug 2021 06:24:51 -0300
>> Daniel Henrique Barboza <danielhb413@gmail.com> wrote:
>>
>>> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
>>> ---
>> We usually introduce the compat machine types for all archs in a
>> single patch. One was already posted for 6.2 :
>>
>> https://patchwork.ozlabs.org/project/qemu-devel/patch/20210823122804.7692-7-wangyanan55@huawei.com/
> Would somebody like to fish that patch out of the unrelated large
> series it was posted in so that it can get into the tree sooner?
>
Now I have resent that patch separately, and hopefully someone will take 
it. :)

Thanks,
Yanan
diff mbox series

Patch

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 54e040587d..067f42b528 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -37,6 +37,9 @@ 
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-pci.h"
 
+GlobalProperty hw_compat_6_1[] = {};
+const size_t hw_compat_6_1_len = G_N_ELEMENTS(hw_compat_6_1);
+
 GlobalProperty hw_compat_6_0[] = {
     { "gpex-pcihost", "allow-unmapped-accesses", "false" },
     { "i8042", "extended-state", "false"},
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 81699d4f8b..d39fd4e644 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4685,15 +4685,26 @@  static void spapr_machine_latest_class_options(MachineClass *mc)
     }                                                                \
     type_init(spapr_machine_register_##suffix)
 
+/*
+ * pseries-6.2
+ */
+static void spapr_machine_6_2_class_options(MachineClass *mc)
+{
+    /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(6_2, "6.2", true);
+
 /*
  * pseries-6.1
  */
 static void spapr_machine_6_1_class_options(MachineClass *mc)
 {
-    /* Defaults for the latest behaviour inherited from the base class */
+    spapr_machine_6_2_class_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
 }
 
-DEFINE_SPAPR_MACHINE(6_1, "6.1", true);
+DEFINE_SPAPR_MACHINE(6_1, "6.1", false);
 
 /*
  * pseries-6.0
diff --git a/include/hw/boards.h b/include/hw/boards.h
index accd6eff35..463a5514f9 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -353,6 +353,9 @@  struct MachineState {
     } \
     type_init(machine_initfn##_register_types)
 
+extern GlobalProperty hw_compat_6_1[];
+extern const size_t hw_compat_6_1_len;
+
 extern GlobalProperty hw_compat_6_0[];
 extern const size_t hw_compat_6_0_len;