* [PATCH v7 1/2] target/ppc: Introduce macro for deprecating PowerPC CPUs
2025-06-07 11:04 [PATCH v7 0/2] Deprecate Power8E and Power8NVL Aditya Gupta
@ 2025-06-07 11:04 ` Aditya Gupta
2025-06-07 11:04 ` [PATCH v7 2/2] target/ppc: Deprecate Power8E and Power8NVL Aditya Gupta
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Aditya Gupta @ 2025-06-07 11:04 UTC (permalink / raw)
To: Cédric Le Goater, Philippe Mathieu-Daudé,
Nicholas Piggin, Daniel Henrique Barboza
Cc: Harsh Prateek Bora, Mahesh J Salgaonkar, Madhavan Srinivasan,
qemu-devel, qemu-ppc, Cédric Le Goater
QEMU has a way to deprecate CPUs by setting the 'deprecation_note' in
CPUClass.
Currently PowerPC CPUs don't use this deprecation process.
Introduce 'POWERPC_DEPRECATED_CPU' macro to deprecate particular PowerPC
CPUs in future.
With the change, QEMU will print a warning like below when the
deprecated CPU/Chips are used (example output if power8nvl is deprecated):
$ ./build/qemu-system-ppc64 -M powernv8 --cpu power8nvl -nographic
qemu-system-ppc64: warning: CPU model power8nvl_v1.0-powerpc64-cpu is deprecated -- CPU is unmaintained.
...
Also, print '(deprecated)' for deprecated CPUs in 'qemu-system-ppc64
--cpu ?' (example output if power8nvl is deprecated):
$ ./build/qemu-system-ppc64 --cpu help
...
power8e (alias for power8e_v2.1)
power8nvl_v1.0 PVR 004c0100 (deprecated)
power8nvl (alias for power8nvl_v1.0)
power8_v2.0 PVR 004d0200
...
Suggested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
---
target/ppc/cpu-models.c | 12 +++++++++++-
target/ppc/cpu_init.c | 7 ++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
index ea86ea202abe..bc3f9586cb67 100644
--- a/target/ppc/cpu-models.c
+++ b/target/ppc/cpu-models.c
@@ -32,17 +32,20 @@
/* PowerPC CPU definitions */
#define POWERPC_DEF_PREFIX(pvr, svr, type) \
glue(glue(glue(glue(pvr, _), svr), _), type)
-#define POWERPC_DEF_SVR(_name, _desc, _pvr, _svr, _type) \
+#define POWERPC_DEF_SVR_DEPR(_name, _desc, _pvr, _svr, _type, _deprecation_note) \
static void \
glue(POWERPC_DEF_PREFIX(_pvr, _svr, _type), _cpu_class_init) \
(ObjectClass *oc, const void *data) \
{ \
DeviceClass *dc = DEVICE_CLASS(oc); \
+ CPUClass *cc = CPU_CLASS(oc); \
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc); \
\
pcc->pvr = _pvr; \
pcc->svr = _svr; \
dc->desc = _desc; \
+ \
+ cc->deprecation_note = _deprecation_note; \
} \
\
static const TypeInfo \
@@ -63,6 +66,13 @@
type_init( \
glue(POWERPC_DEF_PREFIX(_pvr, _svr, _type), _cpu_register_types))
+#define POWERPC_DEF_SVR(_name, _desc, _pvr, _svr, _type) \
+ POWERPC_DEF_SVR_DEPR(_name, _desc, _pvr, _svr, _type, NULL)
+
+#define POWERPC_DEPRECATED_CPU(_name, _pvr, _type, _desc, _deprecation_note)\
+ POWERPC_DEF_SVR_DEPR(_name, _desc, _pvr, POWERPC_SVR_NONE, _type, \
+ _deprecation_note)
+
#define POWERPC_DEF(_name, _pvr, _type, _desc) \
POWERPC_DEF_SVR(_name, _desc, _pvr, POWERPC_SVR_NONE, _type)
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index a0e77f2673e5..29b72a86576d 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7143,6 +7143,7 @@ static void ppc_cpu_list_entry(gpointer data, gpointer user_data)
{
ObjectClass *oc = data;
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
+ CPUClass *cc = CPU_CLASS(oc);
DeviceClass *family = DEVICE_CLASS(ppc_cpu_get_family_class(pcc));
const char *typename = object_class_get_name(oc);
char *name;
@@ -7153,7 +7154,11 @@ static void ppc_cpu_list_entry(gpointer data, gpointer user_data)
}
name = cpu_model_from_type(typename);
- qemu_printf(" %-16s PVR %08x\n", name, pcc->pvr);
+ if (cc->deprecation_note) {
+ qemu_printf(" %-16s PVR %08x (deprecated)\n", name, pcc->pvr);
+ } else {
+ qemu_printf(" %-16s PVR %08x\n", name, pcc->pvr);
+ }
for (i = 0; ppc_cpu_aliases[i].alias != NULL; i++) {
PowerPCCPUAlias *alias = &ppc_cpu_aliases[i];
ObjectClass *alias_oc = ppc_cpu_class_by_name(alias->model);
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v7 2/2] target/ppc: Deprecate Power8E and Power8NVL
2025-06-07 11:04 [PATCH v7 0/2] Deprecate Power8E and Power8NVL Aditya Gupta
2025-06-07 11:04 ` [PATCH v7 1/2] target/ppc: Introduce macro for deprecating PowerPC CPUs Aditya Gupta
@ 2025-06-07 11:04 ` Aditya Gupta
2025-06-23 8:23 ` [PATCH v7 0/2] " Aditya Gupta
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Aditya Gupta @ 2025-06-07 11:04 UTC (permalink / raw)
To: Cédric Le Goater, Philippe Mathieu-Daudé,
Nicholas Piggin, Daniel Henrique Barboza
Cc: Harsh Prateek Bora, Mahesh J Salgaonkar, Madhavan Srinivasan,
qemu-devel, qemu-ppc, Cédric Le Goater
Power8E and Power8NVL variants are not of much use in QEMU now, and not
being maintained either.
Power8NVL CPU doesn't boot since skiboot v7.0, or following skiboot commit
to be exact:
commit c5424f683ee3 ("Remove support for POWER8 DD1")
Deprecate the 8E and 8NVL variants.
Suggested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
---
docs/about/deprecated.rst | 9 +++++++++
target/ppc/cpu-models.c | 8 ++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 42037131de12..11fdd5c0409a 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -297,6 +297,15 @@ embedded 405 for power management (OCC) and other internal tasks, it
is theoretically possible to use QEMU to model them. Let's keep the
CPU implementation for a while before removing all support.
+Power8E and Power8NVL CPUs and corresponding Pnv chips (since 10.1)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The Power8E and Power8NVL variants of Power8 are not really useful anymore
+in qemu, and are old and unmaintained now.
+
+The CPUs as well as corresponding Power8NVL and Power8E PnvChips will also
+be considered deprecated.
+
System emulator machines
------------------------
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
index bc3f9586cb67..66001c5ac06d 100644
--- a/target/ppc/cpu-models.c
+++ b/target/ppc/cpu-models.c
@@ -732,12 +732,12 @@
"POWER7 v2.3")
POWERPC_DEF("power7p_v2.1", CPU_POWERPC_POWER7P_v21, POWER7,
"POWER7+ v2.1")
- POWERPC_DEF("power8e_v2.1", CPU_POWERPC_POWER8E_v21, POWER8,
- "POWER8E v2.1")
+ POWERPC_DEPRECATED_CPU("power8e_v2.1", CPU_POWERPC_POWER8E_v21, POWER8,
+ "POWER8E v2.1", "CPU is unmaintained.")
POWERPC_DEF("power8_v2.0", CPU_POWERPC_POWER8_v20, POWER8,
"POWER8 v2.0")
- POWERPC_DEF("power8nvl_v1.0", CPU_POWERPC_POWER8NVL_v10, POWER8,
- "POWER8NVL v1.0")
+ POWERPC_DEPRECATED_CPU("power8nvl_v1.0", CPU_POWERPC_POWER8NVL_v10, POWER8,
+ "POWER8NVL v1.0", "CPU is unmaintained.")
POWERPC_DEF("power9_v2.0", CPU_POWERPC_POWER9_DD20, POWER9,
"POWER9 v2.0")
POWERPC_DEF("power9_v2.2", CPU_POWERPC_POWER9_DD22, POWER9,
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v7 0/2] Deprecate Power8E and Power8NVL
2025-06-07 11:04 [PATCH v7 0/2] Deprecate Power8E and Power8NVL Aditya Gupta
2025-06-07 11:04 ` [PATCH v7 1/2] target/ppc: Introduce macro for deprecating PowerPC CPUs Aditya Gupta
2025-06-07 11:04 ` [PATCH v7 2/2] target/ppc: Deprecate Power8E and Power8NVL Aditya Gupta
@ 2025-06-23 8:23 ` Aditya Gupta
2025-08-08 7:15 ` Cédric Le Goater
2025-09-23 7:40 ` Anushree Mathur
4 siblings, 0 replies; 7+ messages in thread
From: Aditya Gupta @ 2025-06-23 8:23 UTC (permalink / raw)
To: Cédric Le Goater, Philippe Mathieu-Daudé,
Nicholas Piggin, Daniel Henrique Barboza
Cc: Harsh Prateek Bora, Mahesh J Salgaonkar, Madhavan Srinivasan,
qemu-devel, qemu-ppc
Hello,
Ping. Any comments on the series ?
Thanks,
- Aditya G
On 25/06/07 04:34PM, Aditya Gupta wrote:
> Note: No changes, only change compared to v6 is rebased to upstream
>
> Power8E and Power8NVL are not maintained, and not useful to qemu, and
> upstream skiboot also has removed support till Power8 DD1.
> Power8NVL CPU doesn't boot since skiboot v7.0, or following skiboot commit
> to be exact:
>
> commit c5424f683ee3 ("Remove support for POWER8 DD1")
>
> No direct way to deprecate the pnv chips, a field like deprecation_note
> could be added, but felt not needed as the chip will only get used if
> the user requests corresponding 8E / 8NVL CPU, which will print
> deprecation warning.
>
> Also, no separate pnv machine for 8E and 8NVL, user has to pass --cpu,
> which will throw the deprecation warning. So just deprecating CPUs should
> be enough.
>
> Changelog
> =========
> v7:
> + rebased to upstream
> v6:
> + change qemu version from 10.0 to 10.1 in doc
> v5 (https://lore.kernel.org/qemu-devel/20250422043843.26115-1-adityag@linux.ibm.com/):
> + split into 2 patches, defining macro, and deprecating 8e & 8nvl
> v4 (https://lore.kernel.org/qemu-devel/20250330211012.2932258-1-adityag@linux.ibm.com/):
> + remove unnecessary 'if'
> v3:
> + add 'deprecation_note' argument to the POWERPC_DEPRECATED_CPU macro
> v2:
> + add mention to docs/about/deprecated.rst
> + add '(deprecated)' in output of qemu-system-ppc64 --cpu help
>
> Base Commit: 96215036f47403438c7c7869b7cd419bd7a11f82
>
> Aditya Gupta (2):
> target/ppc: Introduce macro for deprecating PowerPC CPUs
> target/ppc: Deprecate Power8E and Power8NVL
>
> docs/about/deprecated.rst | 9 +++++++++
> target/ppc/cpu-models.c | 20 +++++++++++++++-----
> target/ppc/cpu_init.c | 7 ++++++-
> 3 files changed, 30 insertions(+), 6 deletions(-)
>
> --
> 2.49.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v7 0/2] Deprecate Power8E and Power8NVL
2025-06-07 11:04 [PATCH v7 0/2] Deprecate Power8E and Power8NVL Aditya Gupta
` (2 preceding siblings ...)
2025-06-23 8:23 ` [PATCH v7 0/2] " Aditya Gupta
@ 2025-08-08 7:15 ` Cédric Le Goater
2025-08-08 7:19 ` Harsh Prateek Bora
2025-09-23 7:40 ` Anushree Mathur
4 siblings, 1 reply; 7+ messages in thread
From: Cédric Le Goater @ 2025-08-08 7:15 UTC (permalink / raw)
To: Aditya Gupta, Philippe Mathieu-Daudé, Nicholas Piggin,
Daniel Henrique Barboza
Cc: Harsh Prateek Bora, Mahesh J Salgaonkar, Madhavan Srinivasan,
qemu-devel, qemu-ppc
On 6/7/25 13:04, Aditya Gupta wrote:
> Note: No changes, only change compared to v6 is rebased to upstream
>
> Power8E and Power8NVL are not maintained, and not useful to qemu, and
> upstream skiboot also has removed support till Power8 DD1.
> Power8NVL CPU doesn't boot since skiboot v7.0, or following skiboot commit
> to be exact:
>
> commit c5424f683ee3 ("Remove support for POWER8 DD1")
>
> No direct way to deprecate the pnv chips, a field like deprecation_note
> could be added, but felt not needed as the chip will only get used if
> the user requests corresponding 8E / 8NVL CPU, which will print
> deprecation warning.
>
> Also, no separate pnv machine for 8E and 8NVL, user has to pass --cpu,
> which will throw the deprecation warning. So just deprecating CPUs should
> be enough.
>
> Changelog
> =========
> v7:
> + rebased to upstream
> v6:
> + change qemu version from 10.0 to 10.1 in doc
> v5 (https://lore.kernel.org/qemu-devel/20250422043843.26115-1-adityag@linux.ibm.com/):
> + split into 2 patches, defining macro, and deprecating 8e & 8nvl
> v4 (https://lore.kernel.org/qemu-devel/20250330211012.2932258-1-adityag@linux.ibm.com/):
> + remove unnecessary 'if'
> v3:
> + add 'deprecation_note' argument to the POWERPC_DEPRECATED_CPU macro
> v2:
> + add mention to docs/about/deprecated.rst
> + add '(deprecated)' in output of qemu-system-ppc64 --cpu help
>
> Base Commit: 96215036f47403438c7c7869b7cd419bd7a11f82
>
> Aditya Gupta (2):
> target/ppc: Introduce macro for deprecating PowerPC CPUs
> target/ppc: Deprecate Power8E and Power8NVL
>
> docs/about/deprecated.rst | 9 +++++++++
> target/ppc/cpu-models.c | 20 +++++++++++++++-----
> target/ppc/cpu_init.c | 7 ++++++-
> 3 files changed, 30 insertions(+), 6 deletions(-)
>
It's too late for QEMU 10.1. Let's not forget these for the next cycle.
Thanks,
C.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v7 0/2] Deprecate Power8E and Power8NVL
2025-08-08 7:15 ` Cédric Le Goater
@ 2025-08-08 7:19 ` Harsh Prateek Bora
0 siblings, 0 replies; 7+ messages in thread
From: Harsh Prateek Bora @ 2025-08-08 7:19 UTC (permalink / raw)
To: Cédric Le Goater, Aditya Gupta, Philippe Mathieu-Daudé,
Nicholas Piggin, Daniel Henrique Barboza
Cc: Mahesh J Salgaonkar, Madhavan Srinivasan, qemu-devel, qemu-ppc
Hi Cedric,
On 8/8/25 12:45, Cédric Le Goater wrote:
>> Aditya Gupta (2):
>> target/ppc: Introduce macro for deprecating PowerPC CPUs
>> target/ppc: Deprecate Power8E and Power8NVL
>>
>> docs/about/deprecated.rst | 9 +++++++++
>> target/ppc/cpu-models.c | 20 +++++++++++++++-----
>> target/ppc/cpu_init.c | 7 ++++++-
>> 3 files changed, 30 insertions(+), 6 deletions(-)
>>
>
> It's too late for QEMU 10.1. Let's not forget these for the next cycle.
Sure, will add it in ppc-for-10.2 queue.
regards,
Harsh
>
> Thanks,
>
> C.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v7 0/2] Deprecate Power8E and Power8NVL
2025-06-07 11:04 [PATCH v7 0/2] Deprecate Power8E and Power8NVL Aditya Gupta
` (3 preceding siblings ...)
2025-08-08 7:15 ` Cédric Le Goater
@ 2025-09-23 7:40 ` Anushree Mathur
4 siblings, 0 replies; 7+ messages in thread
From: Anushree Mathur @ 2025-09-23 7:40 UTC (permalink / raw)
To: Aditya Gupta, qemu-ppc, qemu-devel
Cc: Harsh Prateek Bora, Mahesh J Salgaonkar, Madhavan Srinivasan,
Philippe Mathieu-Daudé, Cédric Le Goater,
Daniel Henrique Barboza, Nicholas Piggin, anushree.mathur
On 07/06/25 4:34 PM, Aditya Gupta wrote:
> Note: No changes, only change compared to v6 is rebased to upstream
>
> Power8E and Power8NVL are not maintained, and not useful to qemu, and
> upstream skiboot also has removed support till Power8 DD1.
> Power8NVL CPU doesn't boot since skiboot v7.0, or following skiboot commit
> to be exact:
>
> commit c5424f683ee3 ("Remove support for POWER8 DD1")
>
> No direct way to deprecate the pnv chips, a field like deprecation_note
> could be added, but felt not needed as the chip will only get used if
> the user requests corresponding 8E / 8NVL CPU, which will print
> deprecation warning.
>
> Also, no separate pnv machine for 8E and 8NVL, user has to pass --cpu,
> which will throw the deprecation warning. So just deprecating CPUs should
> be enough.
>
> Changelog
> =========
> v7:
> + rebased to upstream
> v6:
> + change qemu version from 10.0 to 10.1 in doc
> v5 (https://lore.kernel.org/qemu-devel/20250422043843.26115-1-adityag@linux.ibm.com/):
> + split into 2 patches, defining macro, and deprecating 8e & 8nvl
> v4 (https://lore.kernel.org/qemu-devel/20250330211012.2932258-1-adityag@linux.ibm.com/):
> + remove unnecessary 'if'
> v3:
> + add 'deprecation_note' argument to the POWERPC_DEPRECATED_CPU macro
> v2:
> + add mention to docs/about/deprecated.rst
> + add '(deprecated)' in output of qemu-system-ppc64 --cpu help
>
> Base Commit: 96215036f47403438c7c7869b7cd419bd7a11f82
>
> Aditya Gupta (2):
> target/ppc: Introduce macro for deprecating PowerPC CPUs
> target/ppc: Deprecate Power8E and Power8NVL
>
> docs/about/deprecated.rst | 9 +++++++++
> target/ppc/cpu-models.c | 20 +++++++++++++++-----
> target/ppc/cpu_init.c | 7 ++++++-
> 3 files changed, 30 insertions(+), 6 deletions(-)
>
>
Hi Aditya,
I have tested this patch, it is giving proper mention as deprecated
for the CPU model Power8E and Power8NVL and here is my observation:
Without the patch it is not showing any cpu-model as deprecated
# qemu-system-ppc64 --cpu help | grep power8
power8e_v2.1 PVR 004b0201
power8e (alias for power8e_v2.1)
power8nvl_v1.0 PVR 004c0100
power8nvl (alias for power8nvl_v1.0)
power8_v2.0 PVR 004d0200
power8 (alias for power8_v2.0)
# qemu-system-ppc64 --cpu help | grep deprecated
No output for this
After applying the patch
# ./qemu-system-ppc64 --cpu help | grep deprecated
power8e_v2.1 PVR 004b0201 (deprecated)
power8nvl_v1.0 PVR 004c0100 (deprecated)
# ./qemu-system-ppc64 --cpu help | grep power8
power8e_v2.1 PVR 004b0201 (deprecated)
power8e (alias for power8e_v2.1)
power8nvl_v1.0 PVR 004c0100 (deprecated)
power8nvl (alias for power8nvl_v1.0)
power8_v2.0 PVR 004d0200
power8 (alias for power8_v2.0)
Tested-by: Anushree Mathur <anushree.mathur@linux.ibm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread