From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: lsoaresp@redhat.com, marcandre.lureau@gmail.com,
qemu-devel@nongnu.org, peterx@redhat.com, quintela@redhat.com
Subject: Re: [PATCH] migration: Add canary to VMSTATE_END_OF_LIST
Date: Wed, 12 Jan 2022 10:42:53 +0000 [thread overview]
Message-ID: <Yd6wrYdzzT/XsSSK@work-vm> (raw)
In-Reply-To: <CAFEAcA9b9NtkyWY2aCUpOvm2J5uRVt9qUPj6gPk3MFtkTh6ceQ@mail.gmail.com>
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On Wed, 12 Jan 2022 at 10:24, Dr. David Alan Gilbert (git)
> <dgilbert@redhat.com> wrote:
> >
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> >
> > We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions;
> > given that the current check is only for ->name being NULL, sometimes
> > we get unlucky and the code apparently works and no one spots the error.
> >
> > Explicitly add a flag, VMS_END that should be set, and assert it is
> > set during the traversal.
>
> Does 'make check' definitely do the traversal for all vmstate
> structs, or do we need to add a "sanity check them all on startup"
> bit of test code ?
Oh I doubt it does; some vmsd's are conditional on guest state, many are
only on particular machine types.
I think the closest we have to being able to walk the tree, is
--dump-vmstate - although you need to call that for each machine type.
(I forgot to add the canary check in the dump-vmstate code, I'll fix
that).
Dave
> thanks
> -- PMM
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2022-01-12 10:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 10:23 [PATCH] migration: Add canary to VMSTATE_END_OF_LIST Dr. David Alan Gilbert (git)
2022-01-12 10:26 ` Peter Maydell
2022-01-12 10:42 ` Dr. David Alan Gilbert [this message]
2022-01-12 10:56 ` Peter Maydell
2022-01-13 1:21 ` Peter Xu
2022-01-13 11:00 ` Peter Maydell
2022-01-13 12:09 ` Peter Xu
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=Yd6wrYdzzT/XsSSK@work-vm \
--to=dgilbert@redhat.com \
--cc=lsoaresp@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).