[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/
From: |
Juan Quintela |
Subject: |
Re: [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c |
Date: |
Fri, 08 May 2020 10:07:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
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().
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).
And yes, I know that this file has both the function and the constant,
sniff.
Later, Juan.
- [PATCH 02/10] exec/ramblock: Add missing 'qemu/rcu.h' include, (continued)
- [PATCH 02/10] exec/ramblock: Add missing 'qemu/rcu.h' include, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 03/10] exec: Move tb_invalidate_phys_range() to 'exec/exec-all.h', Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 04/10] exec/memory-internal: Check CONFIG_SOFTMMU instead of CONFIG_USER_ONLY, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h', Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c, Philippe Mathieu-Daudé, 2020/05/07
- Re: [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c,
Juan Quintela <=
- [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h', Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 08/10] hw/block: Let the NVMe emulated device be target-agnostic, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 09/10] exec: Update coding style to make checkpatch.pl happy, Philippe Mathieu-Daudé, 2020/05/07