From 6b6712efccd383b48a909bee0b29e079a57601ec Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 22 Mar 2017 15:18:04 +0100 Subject: ram: Split dirty bitmap by RAMBlock Both the ram bitmap and the unsent bitmap are split by RAMBlock. Signed-off-by: Juan Quintela Reviewed-by: zhanghailiang Reviewed-by: Peter Xu -- Fix compilation when DEBUG_POSTCOPY is enabled (thanks Hailiang) --- migration/postcopy-ram.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'migration/postcopy-ram.c') 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++; -- cgit v1.2.1