]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
migration: Teach dirtyrate about qemu_target_page_bits()
authorJuan Quintela <quintela@redhat.com>
Thu, 11 May 2023 14:12:07 +0000 (16:12 +0200)
committerJuan Quintela <quintela@redhat.com>
Mon, 15 May 2023 08:33:05 +0000 (10:33 +0200)
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>

migration/dirtyrate.c

index 9383e91cd6e9e45e4c07775a52049994c513a57b..f32a690a561848c7a354b2134fd9805959fcb690 100644 (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;
     }