[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] RAMBlocks: qemu_ram_is_shared
From: |
Halil Pasic |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] RAMBlocks: qemu_ram_is_shared |
Date: |
Wed, 8 Mar 2017 18:36:09 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 03/07/2017 07:36 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> Provide a helper to say whether a RAMBlock was created as a
> shared mapping.
>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> ---
> exec.c | 5 +++++
> include/exec/cpu-common.h | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/exec.c b/exec.c
> index aabb035..c2cc455 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1560,6 +1560,11 @@ const char *qemu_ram_get_idstr(RAMBlock *rb)
> return rb->idstr;
> }
>
> +bool qemu_ram_is_shared(RAMBlock *rb)
> +{
> + return rb->flags & RAM_SHARED;
Hm, it appears to me RAM_SHARED is defined conditionally, that's within
#if !defined(CONFIG_USER_ONLY)
#endif
The function however seems to be defined and using RAM_SHARED
unconditionally. Either one or the other seems inappropriate to me.
Regards,
Halil