qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH V5 03/23] physmem: fd-based shared memory


From: Peter Xu
Subject: Re: [PATCH V5 03/23] physmem: fd-based shared memory
Date: Tue, 24 Dec 2024 12:27:15 -0500

On Tue, Dec 24, 2024 at 08:16:48AM -0800, Steve Sistare wrote:
> @@ -2079,6 +2100,41 @@ RAMBlock *qemu_ram_alloc_internal(ram_addr_t size, 
> ram_addr_t max_size,
>      assert((ram_flags & ~(RAM_SHARED | RAM_RESIZEABLE | RAM_PREALLOC |
>                            RAM_NORESERVE | RAM_GUEST_MEMFD)) == 0);
>      assert(!host ^ (ram_flags & RAM_PREALLOC));
> +    assert(max_size >= size);
> +
> +#ifdef CONFIG_POSIX         /* ignore RAM_SHARED for Windows */

Yeh relying on POSIX should also be ok..

> +    if (!host) {
> +        if (ram_flags & RAM_SHARED) {

Nitpick: can merge the two "if"s.

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu




reply via email to

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