From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: aliguori@us.ibm.com, yamahata@valinux.co.jp, quintela@redhat.com,
qemu-devel@nongnu.org, owasserm@redhat.com, pbonzini@redhat.com,
akong@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 11/17] qapi: add qidl-generated qapi schema for rtc
Date: Wed, 6 Jun 2012 17:40:29 -0500 [thread overview]
Message-ID: <20120606224029.GS2916@illuin> (raw)
In-Reply-To: <4FCF08F0.70805@redhat.com>
On Wed, Jun 06, 2012 at 09:38:24AM +0200, Kevin Wolf wrote:
> Am 05.06.2012 18:03, schrieb Michael Roth:
> > On Tue, Jun 05, 2012 at 11:29:24AM +0200, Kevin Wolf wrote:
> >> Am 05.06.2012 03:00, schrieb Michael Roth:
> >>> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> >>> ---
> >>> qidl-generated/mc146818rtc.json | 1 +
> >>> 1 files changed, 1 insertions(+), 0 deletions(-)
> >>> create mode 100644 qidl-generated/mc146818rtc.json
> >>
> >> I haven't looked at the Makefiles, but does this commit mean that the
> >> files aren't generated automatically but you have to run the generator
> >> manually after changing any device struct?
> >
> > Nope, the files are automatically generated when changes are made to
> > QIDL sources and you do a build.
> >
> > The reason they're still checked-in is so that changes to a device's
> > serialization schema can be "signed-off" by the author that made the
> > change. This applies to qidl-generated vmstate descriptions as well.
>
> Doesn't really make sense to me. You already have a sign-off for the
> changed header/source file.
>
> > It also makes an automated `make check-qidl` and, in the case of
> > qidl-generated vmstate descriptions, `make check-vmstate` possible, so
> > that a submitter/maintainer can detect and bring attention to changes to
> > serialized device state that need to be addressed/signed-off when
> > testing/reviewing patches.
>
> Why can't 'make check-qidl' generate the new version itself like a
> simple 'make' would do?
>
Because unless the generated code is checked in at some point, make
check-qidl doesn't have anything to check the newly-generated code against
to flag uncommitted/"undocumented" changes to the ABI.
> > We could get part of the way there by just keeping tabs on changes to qidl
> > sources, but ultimately how we do the serialization is a matter of how the
> > generated visitors look, in which case the generated QAPI schemas are the more
> > reliable representation. Annotations are hints, schemas are ABI, so
> > tracking the latter is more important.
>
> So your statement is that the generator is likely buggy and therefore
> its output should be reviewed as well as the source changes?
The QIDL annotations are a tool/guideline for developers to ease the burdon
of having to think too much about the serialized data representation, but
they can still be misused or neglected, and those changes can still slip
by and break migration just as easily vmstate can be broken today.
Tracking changes to generated QAPI schemas is a way to draw attention to
such changes.
It's easy for some odd field to get a s/int/int64_t/ as
part of a substantial patch series and break compatability.
By committing the generated code, it's easy to detect when this happens,
easily note implications for migration compatability, then go back and review
those device state changes for correctness.
And keeping tabs on QAPI schemas changes for QMP/guest agent ABIs has
proven pretty successful, whereas keeping tabs on device state
changes hasn't.
>
> > Similar rationale for vmstate: the relationship between annotations and
> > the generated vmstate descriptions isn't strong enough that we can
> > easily infer changes based on qidl annotations, and in many cases those
> > inferred changes will be overwritten by special handling in the vmstate
> > generator.
>
> I don't understand. Is this file generated or manually edited? If the
> former, why does having it in the repository add anything new when you
> can (and with appropriate Makefile magic will) always run the generator
> after pulling changes to source files? If the latter, why does the
> subject say it's generated?
It's generated. The rationale is similar to the case for checking in
generated QAPI schemas: we track changes to the generated code to easily
infer the implications for migration on a patch-by-patch basis. It's
easilly to tell when changes have been made to a VMStateDescription in
qidl-generated/, much easier than spotting every extra field or type
change etc. to the various device state structures, especially given
that those are generally part of longer changesets whereas the files in
qidl-generated/ serve one well-known purpose.
>
> Kevin
>
next prev parent reply other threads:[~2012-06-06 22:40 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 1:00 [Qemu-devel] [RFC] Use QEMU IDL for device serialization/vmstate Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor Michael Roth
2012-06-05 1:57 ` Anthony Liguori
2012-06-05 9:25 ` Kevin Wolf
2012-06-05 9:47 ` Anthony Liguori
2012-06-05 10:11 ` Kevin Wolf
2012-06-05 16:21 ` Michael Roth
2012-06-05 19:56 ` Paolo Bonzini
2012-06-05 23:40 ` Anthony Liguori
2012-06-06 5:12 ` Paolo Bonzini
2012-06-06 5:43 ` Anthony Liguori
2012-06-06 7:30 ` Kevin Wolf
2012-06-05 10:00 ` Peter Maydell
2012-06-05 10:10 ` Anthony Liguori
2012-06-11 7:13 ` Andreas Färber
2012-06-11 7:20 ` Paolo Bonzini
2012-06-11 7:56 ` Andreas Färber
2012-06-11 7:59 ` Paolo Bonzini
2012-06-11 9:02 ` Andreas Färber
2012-06-11 8:04 ` Andreas Färber
2012-06-11 13:12 ` Anthony Liguori
2012-06-11 13:37 ` Peter Maydell
2012-06-11 13:09 ` Peter Maydell
2012-06-05 10:06 ` Avi Kivity
2012-06-05 12:19 ` Gerd Hoffmann
2012-06-05 23:41 ` Anthony Liguori
2012-06-06 7:19 ` Avi Kivity
2012-06-05 21:11 ` Michael Roth
2012-06-06 7:31 ` Avi Kivity
2012-06-06 21:36 ` Michael Roth
2012-06-07 7:08 ` Avi Kivity
2012-06-05 23:51 ` Anthony Liguori
2012-06-06 1:25 ` Peter Maydell
2012-06-06 7:45 ` Avi Kivity
2012-06-06 8:27 ` Anthony Liguori
2012-06-06 8:37 ` Avi Kivity
2012-06-06 8:45 ` Anthony Liguori
2012-06-06 8:59 ` Avi Kivity
2012-06-06 9:17 ` Anthony Liguori
2012-06-06 9:58 ` Avi Kivity
2012-06-06 11:12 ` Anthony Liguori
2012-06-06 11:25 ` Avi Kivity
2012-06-06 23:20 ` Anthony Liguori
2012-06-05 1:00 ` [Qemu-devel] [PATCH 02/17] qidl: add qc definitions Michael Roth
2012-06-05 9:25 ` Kevin Wolf
2012-06-05 10:35 ` Jan Kiszka
2012-06-05 11:12 ` Anthony Liguori
2012-06-05 11:26 ` Jan Kiszka
2012-06-05 11:42 ` Kevin Wolf
2012-06-05 14:08 ` Paolo Bonzini
2012-06-05 21:44 ` Michael Roth
2012-06-05 23:35 ` Anthony Liguori
2012-06-05 1:00 ` [Qemu-devel] [PATCH 03/17] qapi: add visitor interfaces for arrays Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 04/17] qapi: QmpOutputVisitor, implement array handling Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 05/17] qapi: qapi-visit.py, support arrays and complex qapi definitions Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 06/17] qapi: qapi-visit.py, add gen support for existing types Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 07/17] qapi: add open-coded visitors for QEMUTimer/struct tm types Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 08/17] rtc: move RTCState declaration to header Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 09/17] rtc: add qc annotations Michael Roth
2012-06-05 10:25 ` Avi Kivity
2012-06-05 10:40 ` Jan Kiszka
2012-06-05 12:42 ` Avi Kivity
2012-06-05 22:07 ` Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 10/17] Makefile: add infrastructure to incorporate qidl-generated files Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 11/17] qapi: add qidl-generated qapi schema for rtc Michael Roth
2012-06-05 9:29 ` Kevin Wolf
2012-06-05 16:03 ` Michael Roth
2012-06-06 7:38 ` Kevin Wolf
2012-06-06 22:40 ` Michael Roth [this message]
2012-06-05 10:11 ` Avi Kivity
2012-06-05 1:00 ` [Qemu-devel] [PATCH 12/17] rtc: add a QOM property for accessing device state Michael Roth
2012-06-05 14:14 ` Paolo Bonzini
2012-06-05 17:54 ` Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 13/17] rtc: add _version() qidl annotations Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 14/17] qidl: add qidl-based generation of vmstate field bindings Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 15/17] Makefile: add qidl-generation of vmstate field descriptions Michael Roth
2012-06-05 1:00 ` [Qemu-devel] [PATCH 16/17] qidl: add qidl-generated vmstate fields for rtc Michael Roth
2012-06-05 10:26 ` Avi Kivity
2012-06-05 23:38 ` Anthony Liguori
2012-06-06 7:47 ` Avi Kivity
2012-06-05 1:00 ` [Qemu-devel] [PATCH 17/17] rtc: use qidl-generated vmstate bindings Michael Roth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120606224029.GS2916@illuin \
--to=mdroth@linux.vnet.ibm.com \
--cc=afaerber@suse.de \
--cc=akong@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=kwolf@redhat.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=yamahata@valinux.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).