qemu-e2k/migration
Dr. David Alan Gilbert bcf4513129 migration: Add VMSTATE_WITH_TMP
VMSTATE_WITH_TMP is for handling structures where some calculation
or rearrangement of the data needs to be performed before the data
hits the wire.
For example,  where the value on the wire is an offset from a
non-migrated base, but the data in the structure is the actual pointer.

To use it, a temporary type is created and a vmsd used on that type.
The first element of the type must be 'parent' a pointer back to the
type of the main structure.  VMSTATE_WITH_TMP takes care of allocating
and freeing the temporary before running the child vmsd.

The post_load/pre_save on the child vmsd can copy things from the parent
to the temporary using the parent pointer and do any other calculations
needed; it can then use normal VMSD entries to do the actual data
storage without having to fiddle around with qemu_get_*/qemu_put_*

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20170203160651.19917-3-dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2017-02-13 17:27:14 +00:00
..
block.c migration/block: Convert saving to BlockBackend 2016-06-08 10:21:08 +02:00
colo-comm.c COLO: Add 'x-colo-lost-heartbeat' command to trigger failover 2016-10-30 15:17:39 +05:30
colo-failover.c COLO: Implement the process of failover for primary VM 2016-10-30 15:17:39 +05:30
colo.c COLO: Don't process failover request while loading VM's state 2017-02-13 17:27:13 +00:00
exec.c migration: set name for all I/O channels created 2016-10-27 09:13:10 +02:00
fd.c migration: set name for all I/O channels created 2016-10-27 09:13:10 +02:00
Makefile.objs build: remove --enable-colo/--disable-colo 2017-01-16 17:52:35 +01:00
migration.c COLO: fix setting checkpoint-delay not working properly 2017-02-13 17:27:13 +00:00
postcopy-ram.c migration/postcopy: Explicitly disallow huge pages 2016-10-13 17:23:53 +02:00
qemu-file-channel.c migration: introduce a new QEMUFile impl based on QIOChannel 2016-05-26 11:31:24 +05:30
qemu-file.c add 'release-ram' migrate capability 2017-02-13 17:27:13 +00:00
qjson.c qjson: free str 2016-08-08 00:00:24 +04:00
ram.c migrate: Introduce zero RAM checks to skip RAM migration 2017-02-13 17:27:13 +00:00
rdma.c migration/rdma: Don't flag an error when we've been told about one 2016-10-13 17:22:38 +02:00
savevm.c migration: consolidate VMStateField.start 2017-02-13 17:27:13 +00:00
socket.c io: change the QIOTask callback signature 2017-01-23 15:32:18 +00:00
tls.c io: change the QIOTask callback signature 2017-01-23 15:32:18 +00:00
trace-events trace: clean up trace-events files 2017-01-31 17:12:15 +00:00
vmstate.c migration: Add VMSTATE_WITH_TMP 2017-02-13 17:27:14 +00:00
xbzrle.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00