qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/7 V10] memory, exec: switch file ram allocatio


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 2/7 V10] memory, exec: switch file ram allocation functions to 'flags' parameters
Date: Tue, 17 Jul 2018 09:02:31 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/16/2018 11:32 PM, address@hidden wrote:
>  RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr,
> -                                 bool share, int fd,
> +                                 uint64_t ram_flags, int fd,
>                                   Error **errp)
>  {
>      RAMBlock *new_block;
> @@ -2280,14 +2280,14 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, 
> MemoryRegion *mr,
>      new_block->mr = mr;
>      new_block->used_length = size;
>      new_block->max_length = size;
> -    new_block->flags = share ? RAM_SHARED : 0;
> +    new_block->flags = ram_flags;

The type of "flags" within RAMBlock is uint32_t.

You should either change the member type in the struct,
or change the argument type in all of these functions.

More likely the latter, since you seem to have just
five used bits at the moment.


r~



reply via email to

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