|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c |
Date: | Fri, 8 May 2020 11:27:27 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 5/8/20 10:07 AM, Juan Quintela wrote:
Philippe Mathieu-Daudé <address@hidden> wrote:The ramblock_recv_bitmap_offset() function is only used once in migration/ram.c, move it there. Signed-off-by: Philippe Mathieu-Daudé <address@hidden>Reviewed-by: Juan Quintela <address@hidden> But, if you are in the mood:}+static inline unsigned long int ramblock_recv_bitmap_offset(void *host_addr,+ RAMBlock *rb) +{ + uint64_t host_addr_offset = + (uint64_t)(uintptr_t)(host_addr - (void *)rb->host); + return host_addr_offset >> TARGET_PAGE_BITS;^^^^^^^^^^^^^^^^ That should be qemu_target_page_bits().
Ah! I've been looking for this function :)
We are trying (not there yet) that migration code is target independent, this TARGET constant are one of the problems (not the only one, thought).
Good.
And yes, I know that this file has both the function and the constant, sniff. Later, Juan.
[Prev in Thread] | Current Thread | [Next in Thread] |