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

2025-01-02 Thread Steven Sistare
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 |

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

2024-12-24 Thread Peter Xu
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))

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

2024-12-24 Thread Steve Sistare
Create MAP_SHARED RAMBlocks by mmap'ing a file descriptor rather than using MAP_ANON, so the memory can be accessed in another process by passing and mmap'ing the fd. This will allow CPR to support memory-backend-ram and memory-backend-shm objects, provided the user creates them with share=on. Us