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: Steven Sistare
Subject: Re: [PATCH V5 03/23] physmem: fd-based shared memory
Date: Thu, 2 Jan 2025 13:34:17 -0500
User-agent: Mozilla Thunderbird

On 12/24/2024 12:27 PM, Peter Xu wrote:
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.

The subsequent patch "aux-ram-share option" requires two ifs.
Coding two here minimizes the aux-ram-share diff.

- Steve

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





reply via email to

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