aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-05-11 16:12:07 +0200
committerJuan Quintela <quintela@redhat.com>2023-05-15 10:33:05 +0200
commit148b1ad83ca5ea0b0456942d5f40d943a68b6102 (patch)
tree0aac1391331f4067abad7c5abac5250eac887947 /migration
parentedd83a70dc448f9b7d0f636ff822d1284f8f95d1 (diff)
downloadqemu-148b1ad83ca5ea0b0456942d5f40d943a68b6102.zip
qemu-148b1ad83ca5ea0b0456942d5f40d943a68b6102.tar.gz
qemu-148b1ad83ca5ea0b0456942d5f40d943a68b6102.tar.bz2
migration: Teach dirtyrate about qemu_target_page_bits()
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230511141208.17779-5-quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/dirtyrate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
index 9383e91..f32a690 100644
--- a/migration/dirtyrate.c
+++ b/migration/dirtyrate.c
@@ -401,7 +401,7 @@ static void get_ramblock_dirty_info(RAMBlock *block,
sample_pages_per_gigabytes) >> 30;
/* Right shift TARGET_PAGE_BITS to calc page count */
info->ramblock_pages = qemu_ram_get_used_length(block) >>
- TARGET_PAGE_BITS;
+ qemu_target_page_bits();
info->ramblock_addr = qemu_ram_get_host_addr(block);
strcpy(info->idstr, qemu_ram_get_idstr(block));
}
@@ -512,7 +512,7 @@ find_block_matched(RAMBlock *block, int count,
if (infos[i].ramblock_addr != qemu_ram_get_host_addr(block) ||
infos[i].ramblock_pages !=
- (qemu_ram_get_used_length(block) >> TARGET_PAGE_BITS)) {
+ (qemu_ram_get_used_length(block) >> qemu_target_page_bits())) {
trace_find_page_matched(block->idstr);
return NULL;
}