[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 14/15] qmp: Include "reserve" property of memory backends
From: |
David Hildenbrand |
Subject: |
[PATCH v7 14/15] qmp: Include "reserve" property of memory backends |
Date: |
Wed, 28 Apr 2021 15:37:53 +0200 |
Let's include the new property.
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>
---
hw/core/machine-qmp-cmds.c | 1 +
qapi/machine.json | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index d41db5b93b..2d135ecdd0 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -175,6 +175,7 @@ static int query_memdev(Object *obj, void *opaque)
m->dump = object_property_get_bool(obj, "dump", &error_abort);
m->prealloc = object_property_get_bool(obj, "prealloc", &error_abort);
m->share = object_property_get_bool(obj, "share", &error_abort);
+ m->reserve = object_property_get_bool(obj, "reserve", &error_abort);
m->policy = object_property_get_enum(obj, "policy", "HostMemPolicy",
&error_abort);
host_nodes = object_property_get_qobject(obj,
diff --git a/qapi/machine.json b/qapi/machine.json
index 32650bfe9e..ea68f1a083 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' }}
--
2.30.2
- [PATCH v7 04/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc_from_fd(), (continued)
- [PATCH v7 04/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc_from_fd(), David Hildenbrand, 2021/04/28
- [PATCH v7 05/15] softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate(), David Hildenbrand, 2021/04/28
- [PATCH v7 06/15] softmmu/memory: Pass ram_flags to qemu_ram_alloc() and qemu_ram_alloc_internal(), David Hildenbrand, 2021/04/28
- [PATCH v7 07/15] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap(), David Hildenbrand, 2021/04/28
- [PATCH v7 08/15] memory: Introduce RAM_NORESERVE and wire it up in qemu_ram_mmap(), David Hildenbrand, 2021/04/28
- [PATCH v7 09/15] util/mmap-alloc: Support RAM_NORESERVE via MAP_NORESERVE under Linux, David Hildenbrand, 2021/04/28
- [PATCH v7 10/15] hostmem: Wire up RAM_NORESERVE via "reserve" property, David Hildenbrand, 2021/04/28
- [PATCH v7 11/15] qmp: Clarify memory backend properties returned via query-memdev, David Hildenbrand, 2021/04/28
- [PATCH v7 12/15] qmp: Include "share" property of memory backends, David Hildenbrand, 2021/04/28
- [PATCH v7 13/15] hmp: Print "share" property of memory backends with "info memdev", David Hildenbrand, 2021/04/28
- [PATCH v7 14/15] qmp: Include "reserve" property of memory backends,
David Hildenbrand <=
- [PATCH v7 15/15] hmp: Print "reserve" property of memory backends with "info memdev", David Hildenbrand, 2021/04/28