From 69647f9d51795ebea09eef05b5b2d14ffb835baf Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 10 May 2021 13:43:27 +0200 Subject: qmp: Include "reserve" property of memory backends MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Eduardo Habkost Reviewed-by: Markus Armbruster Acked-by: Eduardo Habkost for memory backend and machine core Cc: Eric Blake Cc: Markus Armbruster Cc: Igor Mammedov Signed-off-by: David Hildenbrand Message-Id: <20210510114328.21835-15-david@redhat.com> Signed-off-by: Paolo Bonzini --- qapi/machine.json | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qapi/machine.json') 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' }} -- cgit v1.2.3