qemu-e2k/include
Igor Mammedov 4ebc74dbbf hostmem: fix strict bind policy
When option -mem-prealloc is used with one or more memory-backend
objects, created backends may not obey configured bind policy or
creation may fail after kernel attempts to move pages according
to bind policy.
Reason is in file_ram_alloc(), which will pre-allocate
any descriptor based RAM if global mem_prealloc != 0 and that
happens way before bind policy is applied to memory range.

One way to fix it would be to extend memory_region_foo() API
and add more invariants that could broken later due implicit
dependencies that's hard to track.

Another approach is to drop adhoc main RAM allocation and
consolidate it around memory-backend. That allows to have
single place that allocates guest RAM (main and memdev)
in the same way and then global mem_prealloc could be
replaced by backend's property[s] that will affect created
memory-backend objects but only in correct order this time.

With main RAM now converted to hostmem backends, there is no
point in keeping global mem_prealloc around, so alias
 -mem-prealloc to "memory-backend.prealloc=on"
machine compat[*] property and make mem_prealloc a local
variable to only stir registration of compat property.

*) currently user accessible -global works only with DEVICE
   based objects and extra work is needed to make it work
   with hostmem backends. But that is convenience option
   and out of scope of this already huge refactoring.
   Hence machine compat properties were used.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200219160953.13771-78-imammedo@redhat.com>
2020-02-19 16:50:02 +00:00
..
authz
block blockdev: adds bdrv_parse_aio to use io_uring 2020-01-30 20:59:41 +00:00
chardev chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
crypto
disas disas: Add a field for target-dependant data to disassemble_info 2020-01-29 19:28:52 +01:00
exec tcg: Add support for a helper with 7 arguments 2020-02-11 16:29:16 -08:00
fpu
hw remove no longer used memory_region_allocate_system_memory() 2020-02-19 16:50:01 +00:00
io io: Fix Error usage in a comment <example> 2019-12-18 08:36:15 +01:00
libdecnumber
migration migration: Support QLIST migration 2020-01-20 09:10:23 +01:00
monitor monitor: Move monitor option parsing to monitor/monitor.c 2020-02-17 13:47:48 +01:00
net
qapi qstring: add qstring_free() 2020-01-24 20:59:13 +01:00
qemu Remove support for CLOCK_MONOTONIC not being defined 2020-02-12 16:23:01 +01:00
qom qom: introduce object_property_help() 2020-01-24 20:59:16 +01:00
scsi
standard-headers virtiofsd: Pull in kernel's fuse.h 2020-01-23 16:41:36 +00:00
sysemu hostmem: fix strict bind policy 2020-02-19 16:50:02 +00:00
tcg tcg: Add tcg_gen_gvec_5_ptr 2020-02-12 14:58:36 -08:00
ui display/gtk: get proper refreshrate 2020-01-14 07:26:36 +01:00
user linux-user: Include trace-root.h in syscall-trace.h 2020-01-15 15:13:09 -10:00
elf.h target/arm/arch_dump: Add SVE notes 2020-01-23 15:34:04 +00:00
glib-compat.h
qemu-common.h
qemu-io.h
trace-tcg.h