summaryrefslogtreecommitdiffstats
path: root/include/migration
Commit message (Collapse)AuthorAgeFilesLines
...
* migration: Split registration functions from vmstate.hJuan Quintela2017-06-132-38/+56
| | | | | | | | | They are indpendent, and nowadays almost every device register things with qdev->vmsd. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peterx@redhat.com>
* migration: Move self_announce_delay() to misc.hJuan Quintela2017-06-132-10/+10
| | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
* migration: remove register_savevm()Laurent Vivier2017-06-061-8/+0Star
| | | | | | | | | | | We can replace the four remaining calls of register_savevm() by calls to register_savevm_live(). So we can remove the function and as we don't allocate anymore the ops pointer with g_new0() we don't have to free it then. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* migration: Move include/migration/block.h into migration/Juan Quintela2017-06-012-47/+8Star
| | | | | | | | All functions were internal, except blk_mig_init() that is exported in misc.h now. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Export ram.c functions in its own fileJuan Quintela2017-06-012-38/+21Star
| | | | | | | | All functions are internal except for ram_mig_init(). Create migration/misc.h for this kind of functions. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Create include for migration snapshotsJuan Quintela2017-06-011-0/+21
| | | | | | | Start removing migration code from sysemu/sysemu.h. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Export rdma.c functions in its own fileJuan Quintela2017-06-011-4/+0Star
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Export tls.c functions in its own fileJuan Quintela2017-06-011-10/+0Star
| | | | | | | | | Just for the functions exported from tls.c. Notice that we can't remove the migration/migration.h include from tls.c because it access directly MigrationState for the tls params. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Export socket.c functions in its own fileJuan Quintela2017-06-011-8/+0Star
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Export fd.c functions in its own fileJuan Quintela2017-06-011-4/+0Star
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Export exec.c functions in its own fileJuan Quintela2017-06-011-4/+0Star
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Split qemu-file.hJuan Quintela2017-06-012-309/+164Star
| | | | | | | | | | Split the file into public and internal interfaces. I have to rename the external one because we can't have two include files with the same name in the same directory. Build system gets confused. The only exported functions are the ones that handle basic types. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: loadvm handlers are not usedJuan Quintela2017-06-012-7/+0Star
| | | | | | | | | So we remove all traces of them. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Remove vmstate.h from migration.hJuan Quintela2017-05-181-1/+0Star
| | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- Minor rearrangements due to rebase
* migration: Remove qemu-file.h from vmstate.hJuan Quintela2017-05-181-3/+0Star
| | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> -- minor rearangements due to the rebase
* migration: Move qjson.h to migration/Juan Quintela2017-05-181-29/+0Star
| | | | | | | It is only used for migration code. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Remove migration.h from colo.hJuan Quintela2017-05-181-1/+0Star
| | | | | | | migration.h is not included in any includes now. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* migration: Export qemu-file-channel.c functions in its own fileJuan Quintela2017-05-182-4/+1Star
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Split migration/channel.c for channel operationsJuan Quintela2017-05-181-7/+0Star
| | | | | | | | | | Create an include for its exported functions. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> --- Add proper header
* migration: Create migration/xbzrle.hJuan Quintela2017-05-181-4/+0Star
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* block migration: Allow compile time disableDr. David Alan Gilbert2017-05-181-1/+23
| | | | | | | | | | | | | | | | | | | | Many users now prefer to use drive_mirror over NBD as an alternative to the older migrate -b option; drive_mirror is more complex to setup but gives you more options (e.g. only migrating some of the disks if some of them are shared). Allow the large chunk of block migration code to be compiled out for those who don't use it. Based on a downstream-patch we've had for a while by Jeff Cody. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> -- - When compiled out, allow seting block only with false value (eric)
* migration: Remove old MigrationParamsJuan Quintela2017-05-182-9/+2Star
| | | | | | | | | Not used anymore after moving block migration to use capabilities. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* migration: Remove use of old MigrationParamsJuan Quintela2017-05-181-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have change in the previous patch to use migration capabilities for it. Notice that we continue using the old command line flags from migrate command from the time being. Remove the set_params method as now it is empty. For savevm, one can't do a: savevm -b/-i foo but now one can do: migrate_set_capability block on savevm foo And we can't use block migration. We could disable block capability unconditionally, but it would not be much better. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> --- - Maintain shared/enabled dependency (Xu suggestion) - Now we maintain the dependency on the setter functions - improve error messages
* migration: Create block capabilityJuan Quintela2017-05-182-0/+8
| | | | | | | | | | | | | | | Create one capability for block migration and one parameter for incremental block migration. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> --- - address all Markus comments - use Markus and Eric text descriptions - change logic another time - improve text messages
* migration: Move check_migratable() into qdev.cJuan Quintela2017-05-172-6/+2Star
| | | | | | | | | The function is only used once, and nothing else in migration knows about objects. Create the function vmstate_device_is_migratable() in savem.c that really do the bit that is related with migration. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* migration: Move postcopy stuff to postcopy-ram.cJuan Quintela2017-05-171-26/+0Star
| | | | | | | Yes, we don't have a good place to put that stuff. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Move page_cache.c to migration/Juan Quintela2017-05-171-86/+0Star
| | | | | | | It is only used by migration, so move it there. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Create migration/blocker.hJuan Quintela2017-05-172-18/+35
| | | | | | | | This allows us to remove lots of includes of migration/migration.h Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* Merge remote-tracking branch 'quintela/tags/migration/20170504' into stagingStefan Hajnoczi2017-05-052-95/+2Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | migration/next for 20170504 # gpg: Signature made Thu 04 May 2017 10:35:41 AM BST # gpg: using RSA key 0xF487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * quintela/tags/migration/20170504: migration: Extra tracing migration: Move postcopy-ram.h to migration/ monitor: Move hmp_info_snapshots from savevm.c to hmp.c monitor: Move hmp_delvm from savevm.c to hmp.c monitor: Move hmp_savevm from savevm.c to hmp.c monitor: Move hmp_loadvm from monitor.c to hmp.c monitor: Remove monitor parameter from save_vmstate migration: to_dst_file at that point is NULL migration: setup bi-directional I/O channel for exec: protocol ram: Split dirty bitmap by RAMBlock Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * migration: Move postcopy-ram.h to migration/Juan Quintela2017-05-041-91/+0Star
| | | | | | | | | | | | | | It is internal to migration, not intended for other users. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
| * ram: Split dirty bitmap by RAMBlockJuan Quintela2017-05-042-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | Both the ram bitmap and the unsent bitmap are split by RAMBlock. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Peter Xu <peterx@redhat.com> -- Fix compilation when DEBUG_POSTCOPY is enabled (thanks Hailiang)
* | Merge remote-tracking branch 'shorne/tags/pull-or-20170504' into stagingStefan Hajnoczi2017-05-052-0/+25
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Openrisc Features and Fixes for qemu 2.10 # gpg: Signature made Thu 04 May 2017 01:41:45 AM BST # gpg: using RSA key 0xC3B31C2D5E6627E4 # gpg: Good signature from "Stafford Horne <shorne@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: D9C4 7354 AEF8 6C10 3A25 EFF1 C3B3 1C2D 5E66 27E4 * shorne/tags/pull-or-20170504: target/openrisc: Support non-busy idle state using PMR SPR target/openrisc: Remove duplicate features property target/openrisc: Implement full vmstate serialization migration: Add VMSTATE_STRUCT_2DARRAY() target/openrisc: implement shadow registers migration: Add VMSTATE_UINTTL_2DARRAY() target/openrisc: add numcores and coreid support target/openrisc: Fixes for memory debugging target/openrisc: Implement EPH bit target/openrisc: Implement EVBAR register MAINTAINERS: Add myself as openrisc maintainer Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * migration: Add VMSTATE_STRUCT_2DARRAY()Stafford Horne2017-05-041-0/+18
| | | | | | | | | | | | | | For openrisc we implement tlb state as a 2d array of tlb entry structs. This is added to allow easy storing of state of 2d arrays. Signed-off-by: Stafford Horne <shorne@gmail.com>
| * migration: Add VMSTATE_UINTTL_2DARRAY()Stafford Horne2017-05-041-0/+7
| | | | | | | | | | | | | | | | In openRISC we are implementing the shadow registers as a 2d array. Using this target long method rather than direct 32-bit alternatives is consistent with the rest of our vm state serialization logic. Signed-off-by: Stafford Horne <shorne@gmail.com>
* | migration: rename max_size to threshold_sizePeter Xu2017-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In migration codes (especially in migration_thread()), max_size is used in many place for the threshold value that we will start to do the final flush and jump to the next stage to dump the whole rest things to destination. However its name is confusing to first readers. Let's rename it to "threshold_size" when proper and add a comment for it. No functional change is made. CC: Juan Quintela <quintela@redhat.com> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | migration: Remove MigrationState parameter from migration_is_idle()Juan Quintela2017-04-211-1/+1
| | | | | | | | | | | | | | Only user don't have a MigrationState handly. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* | ram: ram_discard_range() don't use the mis parameterJuan Quintela2017-04-211-2/+1Star
| | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | migration: Remove MigrationState from migration_in_postcopyJuan Quintela2017-04-211-1/+1
| | | | | | | | | | | | | | | | | | We need to call for the migrate_get_current() in more that half of the uses, so call that inside. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | ram: Move postcopy_requests into RAMStateJuan Quintela2017-04-211-4/+2Star
| | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | ram: Move dirty_pages_rate to RAMStateJuan Quintela2017-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat it like the rest of ram stats counters. Export its value the same way. As an added bonus, no more MigrationState used in migration_bitmap_sync(); Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> -- Again, dave was the one reviewing it
* | ram: Remove dirty_bytes_rateJuan Quintela2017-04-211-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | It can be recalculated from dirty_pages_rate. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> -- Dave was the one that reviewed it O:-)
* | ram: Create ram_dirty_sync_count()Juan Quintela2017-04-211-1/+1
| | | | | | | | | | | | | | | | This is a ram field that was inside MigrationState. Move it to RAMState and make it the same that the other ram stats. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | ram: Move src_page_req* to RAMStateJuan Quintela2017-04-211-16/+1Star
| | | | | | | | | | | | | | | | | | This are the last postcopy fields still at MigrationState. Once there Move MigrationSrcPageRequest to ram.c and remove MigrationState parameters where appropiate. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | ram: Move last_req_rb to RAMStateJuan Quintela2017-04-211-2/+0Star
| | | | | | | | | | | | | | | | | | It was on MigrationState when it is only used inside ram.c for postcopy. Problem is that we need to access it without being able to pass it RAMState directly. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | ram: Remove norm_mig_bytes_transferredJuan Quintela2017-04-211-1/+0Star
| | | | | | | | | | | | | | Its value can be calculated by other exported. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* | ram: Remove unused pages_skipped variableJuan Quintela2017-04-211-2/+0Star
| | | | | | | | | | | | | | | | | | For compatibility, we need to still send a value, but just specify it and comment the fact. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | ram: Remove unused dup_mig_bytes_transferred()Juan Quintela2017-04-211-1/+0Star
| | | | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* | ram: Rename flush_page_queue() to migration_page_queue_free()Juan Quintela2017-04-211-1/+1
|/ | | | | | | | It reflects better what it does. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
* postcopy: Use temporary for placing zero huge pagesDr. David Alan Gilbert2017-02-281-0/+1
| | | | | | | | | | | | The kernel can't do UFFDIO_ZEROPAGE for huge pages, so we have to allocate a temporary (always zero) page and use UFFDIO_COPYPAGE on it. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Message-Id: <20170224182844.32452-9-dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* postcopy: Plumb pagesize down into place helpersDr. David Alan Gilbert2017-02-281-2/+4
| | | | | | | | | | | | Now we deal with normal size pages and huge pages we need to tell the place handlers the size we're dealing with and make sure the temporary page is large enough. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Message-Id: <20170224182844.32452-8-dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>