On 29/3/25 19:04, Aditya Gupta wrote:
Power8E and Power8NVL variants are not of much use in QEMU now, and not
being maintained either.

Newer skiboot might not be able to boot Power8NVL since skiboot v7.0

Deprecate the 8E and 8NVL variants.

After deprecation, QEMU will print a warning like below when the
CPU/Chips are used:

     $ ./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.
     ...
     $ ./build/qemu-system-ppc64 -M powernv8 --cpu power8e -nographic
     qemu-system-ppc64: warning: CPU model power8e_v2.1-powerpc64-cpu is 
deprecated -- CPU is unmaintained.
     ...
     $ ./build/qemu-system-ppc64 -M pseries --cpu power8e -nographic
     qemu-system-ppc64: warning: CPU model power8e_v2.1-powerpc64-cpu is 
deprecated -- CPU is unmaintained.
     ...

Also, print '(deprecated)' for deprecated CPUs in 'qemu-system-ppc64
--cpu ?':

     $ ./build/qemu-system-ppc64 --cpu help
       ...
       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)
       power9_v2.0      PVR 004e1200
       power9_v2.2      PVR 004e1202
       ...

Suggested-by: Cédric Le Goater <c...@kaod.org>
Signed-off-by: Aditya Gupta <adit...@linux.ibm.com>



diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
index ece348178188..0a2227802c06 100644
--- a/target/ppc/cpu-models.c
+++ b/target/ppc/cpu-models.c
@@ -32,17 +32,22 @@
  /* 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, 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;                                          \
+                                                                            \
+        if (_deprecation_note) {                                            \
+            cc->deprecation_note = _deprecation_note;                       \

As mentioned in v2, we can just assign, no need to check.
Otherwise LGTM, thanks!

+        }                                                                   \
      }                                                                       \

Reply via email to