Skip to content

hw: define and enforce a standard lifecycle for versioned machines

Daniel P. Berrangé qemu-arm qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 15 repliesIn review
  2. v114 patches 23 repliesSuperseded

Changes in v2 from the cover letter

- Various docs improvements and minor fixes from original review
- Rebased and resolved conflicts with Philippe's merged series

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14include/hw: add helpers for defining versioned machine typesinclude/hw/boards.h+185 -00 replies
2/14hw/arm: convert 'virt' machine definitions to use new macroshw/arm/virt.c+15 -131 reply
3/14hw/s390x: convert 'ccw' machine definitions to use new macroshw/s390x/s390-virtio-ccw.c+53 -431 reply
4/14hw/ppc: convert 'spapr' machine definitions to use new macroshw/ppc/spapr.c+51 -420 replies
5/14hw/m68k: convert 'virt' machine definitions to use new macroshw/m68k/virt.c+29 -221 reply
6/14hw/i386: convert 'i440fx' machine definitions to use new macroshw/i386/pc_piix.c include/hw/i386/pc.h+122 -1232 replies
7/14hw/i386: convert 'q35' machine definitions to use new macroshw/i386/pc_q35.c+90 -1252 replies
8/14include/hw: add macros for deprecation & removal of versioned machinesinclude/hw/boards.h+96 -01 reply
9/14include/hw: temporarily disable deletion of versioned machine typesinclude/hw/boards.h+18 -11 reply
10/14hw: set deprecation info for all versioned machine typeshw/arm/virt.c hw/m68k/virt.c hw/ppc/spapr.c +2 more+5 -01 reply
11/14hw: skip registration of outdated versioned machine typeshw/arm/virt.c hw/m68k/virt.c hw/ppc/spapr.c +2 more+5 -01 reply
12/14hw/ppc: remove obsolete manual deprecation reason string of spapr machineshw/ppc/spapr.c+0 -11 reply
13/14hw/i386: remove obsolete manual deprecation reason string of i440fx machineshw/i386/pc_piix.c+0 -11 reply
14/14docs: document special exception for machine type deprecation & removaldocs/about/deprecated.rst+13 -01 reply

Reviews trailers per patch

All 14 patches have a Reviewed-by or Acked-by.

PatchThomas HuthEric BlakePhilippe Mathieu-Daudé
1/14R-b R-b
2/14R-b R-b
3/14R-b R-b
4/14R-b
5/14R-b R-b
6/14R-b R-b
7/14R-b R-b
8/14R-b R-b
9/14R-b
10/14R-b R-b
11/14R-b R-b
12/14R-b R-b
13/14R-b R-b
14/14R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/14] hw: define and enforce a standard lifecycle for versioned machines

Thomas proposed a new deprecation and removal policy for versioned machine types that would see them liable for deletion after 6 years:

https://lists.nongnu.org/archive/html/qemu-devel/2024-04/msg04683.html

This suggest was met with broad approval, however, I suggested that we could take it further and actually mark them deprecated sooner, at the 3 year timeframe, and also fully automate the enablement of the runtime deprecation warning without developer intervention on every release cycle.

This series implements my suggestions.

The first patch introduces some helper macros and documents a standard code pattern for defining versioned machine types across targets.

The next 6 patches convert existing targets with versioned machine types (arm, s390x, ppc, m68k, i386) to use the new helper macros and code patterns.

A further patch introduces some helper macros for automating the handling of deprecation and deletion of versioned machine types.

Two more patches then enable the deprecation and deletion logic across all versioned machines

Finally we do some cleanup and document the new policy.

........a tangent about VERSION file handling.......

One oddity here, is that during the development and release candidate phases the automatic logic in this series has an off-by-1 error.

This is because when we, for example, add the "9.1" machine type versions, the VERSION file is still reporting '9.0.50', and then '9.0.9{1,2,3,4}'.

IOW, during development and in rc candidates, we fail to deprecate and delete 1 machine type. We should already have deprecated the 6.1 machine types, but the most recently deprecated is 6.0. This is pretty harmless since the final release does the right thing.

I wonder, however, whether we would benefit from changing how we update the VERSION file.

eg instead of re-using the micro digit to indicate a dev or rc snapshot, represent those explicitly. eg "9.1.0-dev" and "9.1.0-rc1", "9.1.0-rc2", etc in VERSION.

We don't use the full QEMU_VERSION in the code in all that many places. It appears in some help messages for command line tools, and in QMP query-version response, and in a few other misc places. At a glance it appears all of those places would easily handle a tagged version.

For release candidates in particular I think it would be saner to show the user the actual version the release is about to become, rather than the previous release's version. This would make the reported version match the rc tarball naming too which would be nice.

Anyway, this isn't a blocker for this machine type versioning proposal, just a thought....

Changed in v2:

- Various docs improvements and minor fixes from original review
- Rebased and resolved conflicts with Philippe's merged series

Daniel P. Berrangé (14):
include/hw: add helpers for defining versioned machine types hw/arm: convert 'virt' machine definitions to use new macros hw/s390x: convert 'ccw' machine definitions to use new macros hw/ppc: convert 'spapr' machine definitions to use new macros hw/m68k: convert 'virt' machine definitions to use new macros hw/i386: convert 'i440fx' machine definitions to use new macros hw/i386: convert 'q35' machine definitions to use new macros include/hw: add macros for deprecation & removal of versioned machines include/hw: temporarily disable deletion of versioned machine types
hw: set deprecation info for all versioned machine types
hw: skip registration of outdated versioned machine types hw/ppc: remove obsolete manual deprecation reason string of spapr
machines
hw/i386: remove obsolete manual deprecation reason string of i440fx
machines
docs: document special exception for machine type deprecation &
removal

 docs/about/deprecated.rst  |  13 ++
 hw/arm/virt.c              |  30 ++--
 hw/i386/pc_piix.c          | 220 ++++++++++++---------------
 hw/i386/pc_q35.c           | 215 +++++++++++---------------
 hw/m68k/virt.c             |  53 ++++---
 hw/ppc/spapr.c             |  96 ++++++------
 hw/s390x/s390-virtio-ccw.c |  98 ++++++------
 include/hw/boards.h        | 298 +++++++++++++++++++++++++++++++++++++
 include/hw/i386/pc.h       |  28 ++++
 9 files changed, 681 insertions(+), 370 deletions(-)
Signature · 1 line
2.43.0