[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
- [PATCH V5 00/23] Live update: cpr-transfer, Steve Sistare, 2024/12/24
- [PATCH V5 05/23] machine: aux-ram-share option, Steve Sistare, 2024/12/24
- [PATCH V5 03/23] physmem: fd-based shared memory, Steve Sistare, 2024/12/24
- Re: [PATCH V5 03/23] physmem: fd-based shared memory,
Peter Xu <=
- [PATCH V5 04/23] memory: add RAM_PRIVATE, Steve Sistare, 2024/12/24
- [PATCH V5 07/23] physmem: preserve ram blocks for cpr, Steve Sistare, 2024/12/24
- [PATCH V5 06/23] migration: cpr-state, Steve Sistare, 2024/12/24
- [PATCH V5 01/23] backends/hostmem-shm: factor out allocation of "anonymous shared memory with an fd", Steve Sistare, 2024/12/24
- [PATCH V5 08/23] hostmem-memfd: preserve for cpr, Steve Sistare, 2024/12/24
- [PATCH V5 10/23] migration: enhance migrate_uri_parse, Steve Sistare, 2024/12/24
- [PATCH V5 13/23] migration: VMSTATE_FD, Steve Sistare, 2024/12/24