From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, amit.shah@redhat.com, quintela@redhat.com,
duanj@linux.vnet.ibm.com, pasic@linux.vnet.ibm.com
Cc: david@gibson.dropbear.id.au
Subject: [Qemu-devel] [very-WIP 0/4] Migration: VMSTATE_WITH_TMP
Date: Tue, 11 Oct 2016 18:18:29 +0100 [thread overview]
Message-ID: <20161011171833.20803-1-dgilbert@redhat.com> (raw)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Hi,
I'm interested in comments on the idea here, it's certainly
not ready to go in yet; and VERY untested.
Here I've added a macro, VMSTATE_WITH_TMP which allows
you to allocate a temporary structure, transmit that with a
VMStateDescription and then free that temporary.
A pointer to the parent structure is set up in the temporary
allowing the pre_load/pre_save/post_load off the child vmsd
to copy/calculate things to fill in the temporary.
There are 4 patches:
a) Add VMSTATE_WITH_TMP
b) A test for (a)
An easy read to see how (a) works
c) Conversion of SLIRPs sbuf structure to a VMState
This is a nice use of VMSTATE_WITH_TMP since
it needs to calculate and send a couple of offsets
based off the contents of the structure but not
the raw fields.
d) Conversion of virtio-net to VMState; this is
pretty hairy, and the previous version I posted
added a bunch of migration only variables into the
structure; here I use 3 VMSTATE_WITH_TMP's to
avoid it.
Both (c) & (d) depend on a whole bunch of related
patches I'm still cooking, but they should let people
see how VMSTATE_WITH_TMP is used.
I think it works OK; it's not exactly compact though,
you often seem to end up with more VMStateDescription
boiler plate and quite a few trivial pre_load/pre_save.
Note this isn't standalone; it depends on Jianjun's
patches that modify the .get/.put parameters and a bunch
of smaller patches of mine.
Comments welcome,
Dave
Dr. David Alan Gilbert (7):
migration: Add VMSTATE_WITH_TMP
tests/migration: Add test for VMSTATE_WITH_TMP
virtio/migration: Migrate virtio-net to VMState
slirp: VMStatify sbuf
--
2.9.3
next reply other threads:[~2016-10-11 17:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 17:18 Dr. David Alan Gilbert (git) [this message]
2016-10-11 17:18 ` [Qemu-devel] [very-WIP 1/7] migration: Add VMSTATE_WITH_TMP Dr. David Alan Gilbert (git)
2016-10-17 3:31 ` David Gibson
2016-10-17 18:49 ` Jianjun Duan
2016-10-17 18:52 ` Dr. David Alan Gilbert
2016-10-17 19:02 ` Jianjun Duan
2016-10-17 19:16 ` Dr. David Alan Gilbert
2016-10-17 19:30 ` Jianjun Duan
2016-10-18 8:06 ` Dr. David Alan Gilbert
2016-10-11 17:18 ` [Qemu-devel] [very-WIP 2/7] tests/migration: Add test for VMSTATE_WITH_TMP Dr. David Alan Gilbert (git)
2016-10-17 3:34 ` David Gibson
2016-10-11 17:18 ` [Qemu-devel] [very-WIP 3/4] slirp: VMStatify sbuf Dr. David Alan Gilbert (git)
2016-10-17 3:36 ` David Gibson
2016-10-17 17:54 ` Halil Pasic
2016-10-17 19:06 ` Dr. David Alan Gilbert
2016-10-18 10:40 ` Halil Pasic
2016-10-11 17:18 ` [Qemu-devel] [very-WIP 4/4] virtio/migration: Migrate virtio-net to VMState Dr. David Alan Gilbert (git)
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=20161011171833.20803-1-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=amit.shah@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=duanj@linux.vnet.ibm.com \
--cc=pasic@linux.vnet.ibm.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).