diff options
author | Juan Quintela <quintela@redhat.com> | 2017-03-22 15:18:04 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-05-04 10:00:38 +0200 |
commit | 6b6712efccd383b48a909bee0b29e079a57601ec (patch) | |
tree | d9d71f7dce54e59bd0c9e1b5ef9fc9d876603880 /migration/postcopy-ram.c | |
parent | e619b14746e5d8c0e53061661fd0e1da01fd4d60 (diff) |
ram: Split dirty bitmap by RAMBlock
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)
Diffstat (limited to 'migration/postcopy-ram.c')
-rw-r--r-- | migration/postcopy-ram.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 85fd8d72b3..e3f4a37b46 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -33,7 +33,6 @@ struct PostcopyDiscardState { const char *ramblock_name; - uint64_t offset; /* Bitmap entry for the 1st bit of this RAMBlock */ uint16_t cur_entry; /* * Start and length of a discard range (bytes) @@ -717,14 +716,12 @@ void *postcopy_get_tmp_page(MigrationIncomingState *mis) * returns: a new PDS. */ PostcopyDiscardState *postcopy_discard_send_init(MigrationState *ms, - unsigned long offset, const char *name) { PostcopyDiscardState *res = g_malloc0(sizeof(PostcopyDiscardState)); if (res) { res->ramblock_name = name; - res->offset = offset; } return res; @@ -745,7 +742,7 @@ void postcopy_discard_send_range(MigrationState *ms, PostcopyDiscardState *pds, { size_t tp_size = qemu_target_page_size(); /* Convert to byte offsets within the RAM block */ - pds->start_list[pds->cur_entry] = (start - pds->offset) * tp_size; + pds->start_list[pds->cur_entry] = start * tp_size; pds->length_list[pds->cur_entry] = length * tp_size; trace_postcopy_discard_send_range(pds->ramblock_name, start, length); pds->cur_entry++; |