qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/5] migration: Teach dirtyrate about qemu_target_page_siz


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 3/5] migration: Teach dirtyrate about qemu_target_page_size()
Date: Thu, 11 May 2023 20:56:19 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1

On 11/5/23 16:12, Juan Quintela wrote:
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
  migration/dirtyrate.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
index 38ea95af59..6706e3fe66 100644
--- a/migration/dirtyrate.c
+++ b/migration/dirtyrate.c
@@ -314,10 +314,10 @@ static void update_dirtyrate(uint64_t msec)
  static uint32_t get_ramblock_vfn_hash(struct RamblockDirtyInfo *info,
                                        uint64_t vfn)
  {
+    int page_size = qemu_target_page_size();

size_t? Otherwise,

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

      uint32_t crc;
- crc = crc32(0, (info->ramblock_addr +
-                vfn * TARGET_PAGE_SIZE), TARGET_PAGE_SIZE);
+    crc = crc32(0, info->ramblock_addr + vfn * page_size, page_size);
trace_get_ramblock_vfn_hash(info->idstr, vfn, crc);
      return crc;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]