qemu-e2k/qapi
David Hildenbrand 9181fb7043 hostmem: Wire up RAM_NORESERVE via "reserve" property
Let's provide a way to control the use of RAM_NORESERVE via memory
backends using the "reserve" property which defaults to true (old
behavior).

Only Linux currently supports clearing the flag (and support is checked at
runtime, depending on the setting of "/proc/sys/vm/overcommit_memory").
Windows and other POSIX systems will bail out with "reserve=false".

The target use case is virtio-mem, which dynamically exposes memory
inside a large, sparse memory area to the VM. This essentially allows
avoiding to set "/proc/sys/vm/overcommit_memory == 0") when using
virtio-mem and also supporting hugetlbfs in the future.

As really only Linux implements RAM_NORESERVE right now, let's expose
the property only with CONFIG_LINUX. Setting the property to "false"
will then only fail in corner cases -- for example on very old kernels
or when memory overcommit was completely disabled by the admin.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com> for memory backend and machine core
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210510114328.21835-11-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-15 20:27:38 +02:00
..
acpi.json
audio.json
authz.json
block-core.json block: Drop the sheepdog block driver 2021-05-12 17:42:23 +02:00
block-export.json
block.json
char.json ui/vdagent: add clipboard support 2021-05-21 09:42:44 +02:00
common.json qapi/qom: Add ObjectOptions for input-* 2021-03-19 10:17:14 +01:00
compat.json qapi: New -compat deprecated-input=crash 2021-03-19 16:05:11 +01:00
control.json
crypto.json qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded' 2021-03-19 10:17:13 +01:00
dump.json
error.json
introspect.json monitor: Drop query-qmp-schema 'gen': false hack 2021-03-19 16:05:09 +01:00
job.json
machine-target.json
machine.json Drop the deprecated unicore32 target 2021-05-12 18:20:52 +02:00
meson.build Revert "hmp: Use QAPI NetdevInfo in hmp_info_network" 2021-04-08 17:33:59 +08:00
migration.json migration/dirtyrate: make sample page count configurable 2021-06-08 20:18:25 +01:00
misc-target.json target/i386/sev: add support to query the attestation report 2021-06-01 09:32:23 -04:00
misc.json
net.json netdev: add more commands to preconfig mode 2021-06-11 10:30:13 +08:00
opts-visitor.c
pci.json
pragma.json block: Remove monitor command block_passwd 2021-03-23 22:31:56 +01:00
qapi-clone-visitor.c
qapi-dealloc-visitor.c
qapi-schema.json qemu-options: New -compat to set policy for deprecated interfaces 2021-03-19 15:43:33 +01:00
qapi-util.c
qapi-visit-core.c qapi: Implement deprecated-input=reject for QMP command arguments 2021-03-19 16:05:11 +01:00
qdev.json
qmp-dispatch.c qapi: New -compat deprecated-input=crash 2021-03-19 16:05:11 +01:00
qmp-event.c
qmp-registry.c
qobject-input-visitor.c qapi: New -compat deprecated-input=crash 2021-03-19 16:05:11 +01:00
qobject-output-visitor.c qapi: Implement deprecated-output=hide for QMP command results 2021-03-19 15:43:33 +01:00
qom.json hostmem: Wire up RAM_NORESERVE via "reserve" property 2021-06-15 20:27:38 +02:00
rdma.json
replay.json
rocker.json
run-state.json
sockets.json sockets: Support multipath TCP 2021-06-08 19:36:22 +01:00
string-input-visitor.c
string-output-visitor.c
tpm.json
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h
trace.json
transaction.json block: Drop the sheepdog block driver 2021-05-12 17:42:23 +02:00
ui.json qmp: add new qmp display-reload 2021-03-23 08:48:21 +01:00
yank.json