From: Paolo Bonzini <pbonzini@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
qemu-devel@nongnu.org,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] scsi: esp: fix migration
Date: Fri, 8 Jul 2016 06:59:59 -0400 (EDT) [thread overview]
Message-ID: <2119653923.5250404.1467975599457.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160708102110.GC10869@grmbl.mre>
> > > - VMSTATE_BUFFER(cmdbuf, ESPState),
> > > + VMSTATE_PARTIAL_BUFFER(cmdbuf, ESPState, 16),
> > > + VMSTATE_BUFFER_START_MIDDLE_V(cmdbuf, ESPState, 16, 4),
> >
> > Amit, would it help the checker if we do something like:
> >
> > - VMSTATE_BUFFER(cmdbuf, ESPState),
> > + VMSTATE_PARTIAL_BUFFER_TEST(cmdbuf, ESPState, 16, v_is_3),
> > + VMSTATE_BUFFER_TEST(cmdbuf, ESPState, from_4),
> >
> > Yes, VMSTATE_PARTIAL_BUFFER_TEST don't exist, but it is trivial to
> > define.
>
> Yea, I think it'll help. But I'm also thinking what else we do in
> code that we can offload to vmstate. Or if there's something that we
> just don't express in vmstate yet.
The checker has to compare this (vmstate version_id = 3):
{
"field": "cmdbuf",
"version_id": 0,
"field_exists": false,
"size": 16
},
to this (vmstate version_id = 4):
{
"field": "cmdbuf",
"version_id": 0,
"field_exists": false,
"size": 16
},
{
"field": "cmdbuf",
"version_id": 4,
"field_exists": false,
"size": 16
},
If the static checker finds a destination field whose version_id is
larger than the source vmstate's version_id, you have to print a
different warning and advance the destination only.
Thanks,
Paolo
next prev parent reply other threads:[~2016-07-08 11:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 14:33 [Qemu-devel] [PATCH] scsi: esp: fix migration Paolo Bonzini
2016-06-27 7:20 ` Amit Shah
2016-06-27 7:54 ` Paolo Bonzini
2016-06-29 12:00 ` Juan Quintela
2016-07-08 10:21 ` Amit Shah
2016-07-08 10:59 ` Paolo Bonzini [this message]
2016-07-08 10:19 ` Amit Shah
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=2119653923.5250404.1467975599457.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=amit.shah@redhat.com \
--cc=dgilbert@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).