On 03/22/2011 09:32 PM, Peter Maydell wrote:
> Just to make things more complicated, this has been "deprecated"O:-)
It has? Your examples below still use it...
The case in which the "subsection needed" function returns true should
be rare, so the version number should rarely need to be bumped. In this
sense, using _V is discouraged/deprecated.
In fact, some people would prefer the version number not to be bumped
anymore, and subsections to be always used instead. So far, every time
the above argument was brought up in the list, people always found a way
to define the "subsection needed" function so that it didn't return
true, and the decision on deprecation of _V was postponed.
Subsections make it easier for downstream versions to backport features
arbitrarily. Suppose you release QEMU with a device at version 9. The
next version adds feature A as version 10 and feature B as version 11.
For a downstream vendor, backporting just feature B is difficult because
they would have three choices:
- the good, but also the hardest: bump to version 11, and save some
dummy (but valid) value for fields related to feature A. This
introduces undesired differences from upstream, and may be difficult.
- the bad: bump to version 10, and have a migration format that is
incompatible with upstream version 10.
- the ugly: keep version 9, and convert the migration data for feature B
to a subsection. This introduces differences from upstream and makes
the migration format incompatible with upstream version, but avoids that
the same version number means different things in different distributions.
So, those people say that subsections are a bit more friendly to
downstream vendors. So they suggest that upstream should use the third
option to begin with, and even use subsections even if the "subsection
needed" function returns true. This makes the backport easier and more
straightforward. The argument is good but, as I said, so far there has
never been an actual need to apply it.
So, Juan's mail documents what QEMU is doing right now accurately, but
there isn't 100% agreement that it should be that way in the future.
Just note that you are encouraged to use subsections (and thus devise a
way to make the subsection optional) whenever possible and whenever it
makes sense to help such downstream distributors.
Paolo