[PATCH v2] ppc/spapr: fix default cpu for pre-9.0 machines.

Harsh Prateek Bora posted 1 patch 8 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250313094705.2361997-1-harshpb@linux.ibm.com
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>
hw/ppc/spapr.c | 1 +
1 file changed, 1 insertion(+)
[PATCH v2] ppc/spapr: fix default cpu for pre-9.0 machines.
Posted by Harsh Prateek Bora 8 months, 1 week ago
When POWER10 CPU was made as default, we missed keeping POWER9 as
default for older pseries releases (pre-9.0) at that time.
This caused breakge in default cpu evaluation for older pseries
machines and hence this fix.

Fixes: 51113013f3 ("ppc/spapr: change pseries machine default to POWER10 CPU")
Cc: qemu-stable@nongnu.org
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
---
v2: addressed review comments from Philippe, Daniel
---
 hw/ppc/spapr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index c15340a58d..825afba4f4 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4781,6 +4781,7 @@ static void spapr_machine_8_2_class_options(MachineClass *mc)
 {
     spapr_machine_9_0_class_options(mc);
     compat_props_add(mc->compat_props, hw_compat_8_2, hw_compat_8_2_len);
+    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power9_v2.2");
 }
 
 DEFINE_SPAPR_MACHINE(8, 2);
-- 
2.43.5
Re: [PATCH v2] ppc/spapr: fix default cpu for pre-9.0 machines.
Posted by Philippe Mathieu-Daudé 8 months, 1 week ago
On 13/3/25 10:47, Harsh Prateek Bora wrote:
> When POWER10 CPU was made as default, we missed keeping POWER9 as
> default for older pseries releases (pre-9.0) at that time.
> This caused breakge in default cpu evaluation for older pseries
> machines and hence this fix.
> 
> Fixes: 51113013f3 ("ppc/spapr: change pseries machine default to POWER10 CPU")
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
> ---
> v2: addressed review comments from Philippe, Daniel
> ---
>   hw/ppc/spapr.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index c15340a58d..825afba4f4 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -4781,6 +4781,7 @@ static void spapr_machine_8_2_class_options(MachineClass *mc)
>   {
>       spapr_machine_9_0_class_options(mc);
>       compat_props_add(mc->compat_props, hw_compat_8_2, hw_compat_8_2_len);
> +    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power9_v2.2");

Ah, this makes more sense!

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>   }
>   
>   DEFINE_SPAPR_MACHINE(8, 2);


Re: [PATCH v2] ppc/spapr: fix default cpu for pre-9.0 machines.
Posted by Daniel P. Berrangé 8 months, 1 week ago
On Thu, Mar 13, 2025 at 03:17:05PM +0530, Harsh Prateek Bora wrote:
> When POWER10 CPU was made as default, we missed keeping POWER9 as
> default for older pseries releases (pre-9.0) at that time.
> This caused breakge in default cpu evaluation for older pseries
> machines and hence this fix.
> 
> Fixes: 51113013f3 ("ppc/spapr: change pseries machine default to POWER10 CPU")
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
> ---
> v2: addressed review comments from Philippe, Daniel
> ---
>  hw/ppc/spapr.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|