memory: add RAM_PRIVATE
authorSteve Sistare <steven.sistare@oracle.com>
Wed, 15 Jan 2025 19:00:31 +0000 (11:00 -0800)
committerFabiano Rosas <farosas@suse.de>
Wed, 29 Jan 2025 14:43:04 +0000 (11:43 -0300)
commit6169f1193657d0ba630a2ce33cef639ae918bce4
tree33fd65ef73cb97e0b000bcb75e024b5a5d9226af
parent9fb40bb9621df9acb88a8128bee2e0f68631b245
memory: add RAM_PRIVATE

Define the RAM_PRIVATE flag.

In RAMBlock creation functions, if MAP_SHARED is 0 in the flags parameter,
in a subsequent patch the implementation may still create a shared mapping
if other conditions require it.  Callers who specifically want a private
mapping, eg for objects specified by the user, must pass RAM_PRIVATE.

After RAMBlock creation, MAP_SHARED in the block's flags indicates whether
the block is shared or private, and MAP_PRIVATE is omitted.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/1736967650-129648-6-git-send-email-steven.sistare@oracle.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
backends/hostmem-epc.c
backends/hostmem-file.c
backends/hostmem-memfd.c
backends/hostmem-ram.c
include/exec/memory.h
system/physmem.c