qemu-s390x
[Top][All Lists]
Advanced

[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.




reply via email to

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