qemu-e2k/include/sysemu
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
..
accel.h accel: Introduce the current_accel() wrapper 2020-01-24 20:59:11 +01:00
arch_init.h Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
balloon.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
block-backend.h block: Add @exact parameter to bdrv_co_truncate() 2019-10-28 12:00:07 +01:00
blockdev.h blockdev: Convert drive_new() to Error 2018-10-19 14:51:34 +02:00
cpus.h tcg: convert "-accel threads" to a QOM property 2019-12-17 19:32:27 +01:00
cryptodev-vhost-user.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
cryptodev-vhost.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
cryptodev.h Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00
device_tree.h device_tree: Add qemu_fdt_node_unit_path 2018-06-29 15:11:01 +01:00
dma.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
dump-arch.h dump: allow target to set the physical base 2016-01-15 14:40:25 +00:00
dump.h qapi: Split dump.json off misc.json 2019-07-02 13:37:00 +02:00
hax.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
hostmem.h hostmem: fix strict bind policy 2020-02-19 16:50:02 +00:00
hvf.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
hw_accel.h hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
iothread.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
kvm.h hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler() 2019-12-17 19:33:51 +01:00
kvm_int.h kvm: split too big memory section on several memslots 2019-09-30 13:51:50 +02:00
memory_mapping.h Clean up inclusion of exec/cpu-common.h 2019-08-16 13:31:52 +02:00
numa.h initialize MachineState::ram in NUMA case 2020-02-19 16:49:53 +00:00
os-posix.h util: drop old utimensat() compat code 2017-05-25 10:30:14 +02:00
os-win32.h glib: use portable g_setenv() 2019-12-17 09:05:23 +01:00
qtest.h qtest: Rename qtest.c:qtest_init() 2019-08-15 19:23:59 +02:00
replay.h replay: record and replay random number sources 2020-01-07 12:08:39 +01:00
reset.h hw: move reset handlers from vl.c to hw/core 2017-01-16 17:52:35 +01:00
rng-random.h rng-random: rename RndRandom to RngRandom 2016-05-23 12:18:43 +05:30
rng.h virtio-rng: change default backend to rng-builtin 2019-09-04 06:32:51 -04:00
runstate.h pvpanic: implement crashloaded event handling 2020-01-24 20:59:07 +01:00
seccomp.h sandbox: disable -sandbox if CONFIG_SECCOMP undefined 2018-06-01 13:44:15 +02:00
sev.h kvm: introduce memory encryption APIs 2018-03-13 12:04:03 +01:00
sysemu.h hostmem: fix strict bind policy 2020-02-19 16:50:02 +00:00
tcg.h qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h 2019-06-11 20:22:09 +02:00
tpm.h tpm_spapr: Support TPM for ppc64 using CRQ based interface 2020-02-02 14:07:57 +11:00
tpm_backend.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
vhost-user-backend.h Add vhost-user-backend 2019-05-10 12:48:35 +02:00
watchdog.h Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
whpx.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
xen-mapcache.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00