Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juan Quintela committed May 15, 2023
1 parent edd83a7 commit 148b1ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migration/dirtyrate.c
Expand Up @@ -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));
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 148b1ad

Please sign in to comment.