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>
This commit is contained in:
Juan Quintela 2023-05-11 16:12:07 +02:00
parent edd83a70dc
commit 148b1ad83c
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}