summary refs log tree commit diff stats
path: root/hw/ppc/spapr.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-06-20 17:57:39 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-07-02 06:58:37 +0200
commita391eeb129de8b0a9cb9fac4d3fbe5bd3a3cc6aa (patch)
tree7ca2e0f7f7a82cef91f0b295d2576e191c9d49e7 /hw/ppc/spapr.c
parent8d3122a80647673eee7a5166041a687dc9879a98 (diff)
downloadfocaccia-qemu-a391eeb129de8b0a9cb9fac4d3fbe5bd3a3cc6aa.tar.gz
focaccia-qemu-a391eeb129de8b0a9cb9fac4d3fbe5bd3a3cc6aa.zip
hw: skip registration of outdated versioned machine types
This calls the MACHINE_VER_DELETION() macro in the machine type
registration method, so that when a versioned machine type reaches
the end of its life, it is no longer registered with QOM and thus
cannot be used.

The actual definition of the machine type should be deleted at
this point, but experience shows that can easily be forgotten.
By skipping registration the manual code deletion task can be
done at any later date.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240620165742.1711389-12-berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r--hw/ppc/spapr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 55268489d3..044e6a8d9d 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4824,6 +4824,7 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
     };                                                               \
     static void MACHINE_VER_SYM(register, spapr, __VA_ARGS__)(void)  \
     {                                                                \
+        MACHINE_VER_DELETION(__VA_ARGS__);                           \
         type_register(&MACHINE_VER_SYM(info, spapr, __VA_ARGS__));   \
     }                                                                \
     type_init(MACHINE_VER_SYM(register, spapr, __VA_ARGS__))