diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-03-16 14:15:18 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-03-16 14:15:18 +0000 |
commit | 9cc7d0cf6a6dc300db4db25421eff782623d6b18 (patch) | |
tree | bde6a86755607d479a93e1439cf6ed21feccbed5 /migration/savevm.c | |
parent | 475fe4576f11e9389a188bd5698ae05458c397c2 (diff) | |
parent | ac8bd439bb7b5dffeb5ff8a17317ca2b192044b6 (diff) |
Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging
# gpg: Signature made Tue 13 Mar 2018 21:11:43 GMT
# gpg: using RSA key 7DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
# Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB
# Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E
* remotes/jnsnow/tags/bitmaps-pull-request:
iotests: add dirty bitmap postcopy test
iotests: add dirty bitmap migration test
migration: add postcopy migration of dirty bitmaps
migration: allow qmp command migrate-start-postcopy for any postcopy
migration: add is_active_iterate handler
migration/qemu-file: add qemu_put_counted_string()
migration: include migrate_dirty_bitmaps in migrate_postcopy
qapi: add dirty-bitmaps migration capability
migration: introduce postcopy-only pending
dirty-bitmap: add locked state
block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap
block/dirty-bitmap: fix locking in bdrv_reclaim_dirty_bitmap
block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r-- | migration/savevm.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index fbeac658c1..f417cef7d5 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1029,6 +1029,11 @@ int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy) continue; } } + if (se->ops && se->ops->is_active_iterate) { + if (!se->ops->is_active_iterate(se->opaque)) { + continue; + } + } /* * In the postcopy phase, any device that doesn't know how to * do postcopy should have saved it's state in the _complete @@ -1221,13 +1226,15 @@ int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only, * for units that can't do postcopy. */ void qemu_savevm_state_pending(QEMUFile *f, uint64_t threshold_size, - uint64_t *res_non_postcopiable, - uint64_t *res_postcopiable) + uint64_t *res_precopy_only, + uint64_t *res_compatible, + uint64_t *res_postcopy_only) { SaveStateEntry *se; - *res_non_postcopiable = 0; - *res_postcopiable = 0; + *res_precopy_only = 0; + *res_compatible = 0; + *res_postcopy_only = 0; QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { @@ -1240,7 +1247,8 @@ void qemu_savevm_state_pending(QEMUFile *f, uint64_t threshold_size, } } se->ops->save_live_pending(f, se->opaque, threshold_size, - res_non_postcopiable, res_postcopiable); + res_precopy_only, res_compatible, + res_postcopy_only); } } @@ -1686,6 +1694,8 @@ static void loadvm_postcopy_handle_run_bh(void *opaque) trace_loadvm_postcopy_handle_run_vmstart(); + dirty_bitmap_mig_before_vm_start(); + if (autostart) { /* Hold onto your hats, starting the CPU */ vm_start(); |