qemu/migration
David Hildenbrand 8dbe22c686 memory: Introduce RAM_NORESERVE and wire it up in qemu_ram_mmap()
Let's introduce RAM_NORESERVE, allowing mmap'ing with MAP_NORESERVE. The
new flag has the following semantics:

"
RAM is mmap-ed with MAP_NORESERVE. When set, reserving swap space (or huge
pages if applicable) is skipped: will bail out if not supported. When not
set, the OS will do the reservation, if supported for the memory type.
"

Allow passing it into:
- memory_region_init_ram_nomigrate()
- memory_region_init_resizeable_ram()
- memory_region_init_ram_from_file()

... and teach qemu_ram_mmap() and qemu_anon_ram_alloc() about the flag.
Bail out if the flag is not supported, which is the case right now for
both, POSIX and win32. We will add Linux support next and allow specifying
RAM_NORESERVE via memory backends.

The target use case is virtio-mem, which dynamically exposes memory
inside a large, sparse memory area to the VM.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com> for memory backend and machine core
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210510114328.21835-9-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-15 20:27:38 +02:00
..
block-dirty-bitmap.c
block.c
block.h
channel.c yank: Unregister function when using TLS migration 2021-06-08 18:50:03 +01:00
channel.h
colo-failover.c
colo.c Remove migrate_set_block_enabled in checkpoint 2021-06-11 10:30:13 +08:00
dirtyrate.c hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds 2021-06-08 20:18:26 +01:00
dirtyrate.h migration/dirtyrate: make sample page count configurable 2021-06-08 20:18:25 +01:00
exec.c
exec.h
fd.c
fd.h
global_state.c
meson.build
migration.c migration: add trace point when vm_stop_force_state fails 2021-06-14 13:28:50 +01:00
migration.h migration: Add cleanup hook for inwards migration 2021-06-08 19:36:18 +01:00
multifd-zlib.c
multifd-zstd.c
multifd.c migration/socket: Close the listener at the end 2021-06-08 19:36:19 +01:00
multifd.h
page_cache.c
page_cache.h
postcopy-ram.c
postcopy-ram.h
qemu-file-channel.c yank: Unregister function when using TLS migration 2021-06-08 18:50:03 +01:00
qemu-file-channel.h
qemu-file.c
qemu-file.h
ram.c memory: Introduce RAM_NORESERVE and wire it up in qemu_ram_mmap() 2021-06-15 20:27:38 +02:00
ram.h
rdma.c migration/rdma: Fix cm event use after free 2021-06-08 18:55:43 +01:00
rdma.h
savevm.c migration: use GDateTime for formatting timestamp in snapshot names 2021-06-14 13:28:50 +01:00
savevm.h
socket.c migration/socket: Close the listener at the end 2021-06-08 19:36:19 +01:00
socket.h
target.c
tls.c
tls.h
trace-events migration: add trace point when vm_stop_force_state fails 2021-06-14 13:28:50 +01:00
trace.h
vmstate-types.c
vmstate.c
xbzrle.c
xbzrle.h
yank_functions.c
yank_functions.h