From: Jason Baron <jbaron@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: yamahata@valinux.co.jp, alex.williamson@redhat.com,
jan.kiszka@siemens.com, qemu-devel@nongnu.org,
quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] pcie: drop version_id field for live migration
Date: Fri, 31 Aug 2012 10:46:51 -0400 [thread overview]
Message-ID: <20120831144651.GC12212@redhat.com> (raw)
In-Reply-To: <20120831084454.GB24072@redhat.com>
On Fri, Aug 31, 2012 at 11:44:54AM +0300, Michael S. Tsirkin wrote:
> On Thu, Aug 30, 2012 at 01:51:10PM -0400, Jason Baron wrote:
> > While testing q35 live migration, I found that the migration would abort with
> > the following error: "Unknown savevm section type 76".
> >
> > The error is due to this check failing in 'vmstate_load_state()':
> >
> > while(field->name) {
> > if ((field->field_exists &&
> > field->field_exists(opaque, version_id)) ||
> > (!field->field_exists &&
> > field->version_id <= version_id)) {
> >
> > The VMSTATE_PCIE_DEVICE() currently has a 'version_id' set to 2. However,
> > 'version_id' in the above check is 1. And thus we fail to load the pcie device
> > field. Further the code returns to 'qemu_loadvm_state()' which produces the
> > error that I saw.
> >
> > I'm proposing to fix this by simply dropping the 'version_id' field from
> > VMSTATE_PCIE_DEVICE(). VMSTATE_PCI_DEVICE() defines no such field and further
> > the vmstate_pcie_device that VMSTATE_PCI_DEVICE() refers to is already
> > versioned. Thus, any versioning issues could be detected at the vmsd level.
> >
> > Taking a step back, I think that the 'field->version_id' should be compared
> > against a saved version number for the field not the 'version_id'. Futhermore,
> > once vmstate_load_state() is called recursively on another vmsd, the check of:
> >
> > if (version_id > vmsd->version_id) {
> > return -EINVAL;
> > }
> >
> > Will never fail since version_id is always equal to vmsd->version_id. So I'm
> > wondering why we aren't storing the vmsd version id of the source in the
> > migration stream?
> >
> > This patch also renames the 'name' field of vmstate_pcie_device from:
> > PCIDevice -> PCIEDevice to differentiate it from vmstate_pci_device.
> >
> > Signed-off-by: Jason Baron <jbaron@redhat.com>
>
> I have this queued to apply already - this is just a repost
> or did I miss something?
>
just a repost...but now we have Juan's ack :)
next prev parent reply other threads:[~2012-08-31 14:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-30 17:51 [Qemu-devel] [PATCH 0/2] pcie migration fixes Jason Baron
2012-08-30 17:51 ` [Qemu-devel] [PATCH 1/2] pcie: drop version_id field for live migration Jason Baron
2012-08-31 8:44 ` Michael S. Tsirkin
2012-08-31 14:46 ` Jason Baron [this message]
2012-08-31 15:42 ` Michael S. Tsirkin
2012-08-31 8:51 ` Juan Quintela
2012-08-30 17:51 ` [Qemu-devel] [PATCH 2/2] pcie_aer: clear cmask for Advanced Error Interrupt Message Number Jason Baron
2012-08-31 8:42 ` Michael S. Tsirkin
2012-08-31 14:45 ` Jason Baron
2012-08-31 15:35 ` Michael S. Tsirkin
2012-08-31 15:43 ` Jason Baron
2012-09-04 20:22 ` [Qemu-devel] [PATCH 2/2 v2] " Jason Baron
2012-09-07 6:01 ` Michael S. Tsirkin
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=20120831144651.GC12212@redhat.com \
--to=jbaron@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=mst@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).