diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2015-11-05 18:10:54 +0000 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2015-11-10 15:00:26 +0100 |
commit | c31b098f64c5bbbc26350b9b5cf98ae2d2888de7 (patch) | |
tree | 9d4dc89ab0824855de81d16848c1f559b2a5153d /migration/ram.c | |
parent | 11cf1d984b86b294972cd25df6286e5b2e98735d (diff) | |
download | qemu-c31b098f64c5bbbc26350b9b5cf98ae2d2888de7.zip |
Modify save_live_pending for postcopy
Modify save_live_pending to return separate postcopiable and
non-postcopiable counts.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r-- | migration/ram.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/migration/ram.c b/migration/ram.c index 4fa44a7bcf..0e5332513d 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1383,7 +1383,9 @@ static int ram_save_complete(QEMUFile *f, void *opaque) return 0; } -static uint64_t ram_save_pending(QEMUFile *f, void *opaque, uint64_t max_size) +static void ram_save_pending(QEMUFile *f, void *opaque, uint64_t max_size, + uint64_t *non_postcopiable_pending, + uint64_t *postcopiable_pending) { uint64_t remaining_size; @@ -1397,7 +1399,9 @@ static uint64_t ram_save_pending(QEMUFile *f, void *opaque, uint64_t max_size) qemu_mutex_unlock_iothread(); remaining_size = ram_save_remaining() * TARGET_PAGE_SIZE; } - return remaining_size; + + /* We can do postcopy, and all the data is postcopiable */ + *postcopiable_pending += remaining_size; } static int load_xbzrle(QEMUFile *f, ram_addr_t addr, void *host) |