mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
hostmem-memfd: honour share=on/off property
The share=on/off property is used to modified mmap() MAP_SHARED setting. Make it on by default for convenience and compatibility reasons. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
15ffb43cbf
commit
36ea397956
@ -59,7 +59,8 @@ memfd_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
|
||||
|
||||
name = object_get_canonical_path(OBJECT(backend));
|
||||
memory_region_init_ram_from_fd(&backend->mr, OBJECT(backend),
|
||||
name, backend->size, true, fd, errp);
|
||||
name, backend->size,
|
||||
backend->share, fd, errp);
|
||||
g_free(name);
|
||||
}
|
||||
|
||||
@ -131,6 +132,7 @@ memfd_backend_instance_init(Object *obj)
|
||||
|
||||
/* default to sealed file */
|
||||
m->seal = true;
|
||||
MEMORY_BACKEND(m)->share = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user