[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 09/14] include/hw: temporarily disable deletion of versioned m
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v2 09/14] include/hw: temporarily disable deletion of versioned machine types |
Date: |
Thu, 20 Jun 2024 17:57:37 +0100 |
The new deprecation and deletion policy for versioned machine types is
being introduced in QEMU 9.1.0.
Under the new policy a number of old machine types (any prior to 2.12)
would be liable for immediate deletion which would be a violation of our
historical deprecation and removal policy
Thus automatic deletions (by skipping QOM registration) are temporarily
gated on existance of the env variable "QEMU_DELETE_MACHINES" / QEMU
version number >= 10.1.0. This allows opt-in testing of the automatic
deletion logic, while activating it fully in QEMU >= 10.1.0.
This whole commit should be reverted in the 10.1.0 dev cycle or shortly
thereafter.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
include/hw/boards.h | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 187ed76646..ef6f18f2c1 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -686,11 +686,28 @@ struct MachineState {
* suitable period of time has passed, it will cause
* execution of the method to return, avoiding registration
* of the machine
+ *
+ * The new deprecation and deletion policy for versioned
+ * machine types was introduced in QEMU 9.1.0.
+ *
+ * Under the new policy a number of old machine types (any
+ * prior to 2.12) would be liable for immediate deletion
+ * which would be a violation of our historical deprecation
+ * and removal policy
+ *
+ * Thus deletions are temporarily gated on existance of
+ * the env variable "QEMU_DELETE_MACHINES" / QEMU version
+ * number >= 10.1.0. This gate can be deleted in the 10.1.0
+ * dev cycle
*/
#define MACHINE_VER_DELETION(...) \
do { \
if (MACHINE_VER_SHOULD_DELETE(__VA_ARGS__)) { \
- return; \
+ if (getenv("QEMU_DELETE_MACHINES") || \
+ QEMU_VERSION_MAJOR > 10 || (QEMU_VERSION_MAJOR == 10 && \
+ QEMU_VERSION_MINOR >= 1)) { \
+ return; \
+ } \
} \
} while (0)
--
2.43.0
- [PATCH v2 00/14] hw: define and enforce a standard lifecycle for versioned machines, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 01/14] include/hw: add helpers for defining versioned machine types, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 02/14] hw/arm: convert 'virt' machine definitions to use new macros, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 03/14] hw/s390x: convert 'ccw' machine definitions to use new macros, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 04/14] hw/ppc: convert 'spapr' machine definitions to use new macros, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 05/14] hw/m68k: convert 'virt' machine definitions to use new macros, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 06/14] hw/i386: convert 'i440fx' machine definitions to use new macros, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 07/14] hw/i386: convert 'q35' machine definitions to use new macros, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 08/14] include/hw: add macros for deprecation & removal of versioned machines, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 09/14] include/hw: temporarily disable deletion of versioned machine types,
Daniel P . Berrangé <=
- [PATCH v2 10/14] hw: set deprecation info for all versioned machine types, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 11/14] hw: skip registration of outdated versioned machine types, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 12/14] hw/ppc: remove obsolete manual deprecation reason string of spapr machines, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 13/14] hw/i386: remove obsolete manual deprecation reason string of i440fx machines, Daniel P . Berrangé, 2024/06/20
- [PATCH v2 14/14] docs: document special exception for machine type deprecation & removal, Daniel P . Berrangé, 2024/06/20