aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2021-05-10 13:43:27 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-06-15 20:27:38 +0200
commit69647f9d51795ebea09eef05b5b2d14ffb835baf (patch)
tree326a8992fa8012cd8d17667d05253ac1e418733d /qapi
parent7428e7ba15cbc2a1a801ea2697f5f47fe1153381 (diff)
qmp: Include "reserve" property of memory backends
Let's include the new property. Instead of relying on CONFIG_LINUX, let's try to unconditionally grab the property and treat errors as "does not exist". Reviewed-by: Philippe Mathieu-Daudé <philmd@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: Eric Blake <eblake@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20210510114328.21835-15-david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/machine.json7
1 files changed, 7 insertions, 0 deletions
diff --git a/qapi/machine.json b/qapi/machine.json
index 1395742a4a..e4d0f9b24f 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -798,6 +798,12 @@
#
# @share: whether memory is private to QEMU or shared (since 6.1)
#
+# @reserve: whether swap space (or huge pages) was reserved if applicable.
+# This corresponds to the user configuration and not the actual
+# behavior implemented in the OS to perform the reservation.
+# For example, Linux will never reserve swap space for shared
+# file mappings. (since 6.1)
+#
# @host-nodes: host nodes for its memory policy
#
# @policy: memory policy of memory backend
@@ -812,6 +818,7 @@
'dump': 'bool',
'prealloc': 'bool',
'share': 'bool',
+ '*reserve': 'bool',
'host-nodes': ['uint16'],
'policy': 'HostMemPolicy' }}