hmp: Print "reserve" property of memory backends with "info memdev"

Let's print the new property.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@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-16-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
David Hildenbrand 2021-05-10 13:43:28 +02:00 committed by Paolo Bonzini
parent 69647f9d51
commit baa014e3b9

View File

@ -112,6 +112,10 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
m->value->prealloc ? "true" : "false");
monitor_printf(mon, " share: %s\n",
m->value->share ? "true" : "false");
if (m->value->has_reserve) {
monitor_printf(mon, " reserve: %s\n",
m->value->reserve ? "true" : "false");
}
monitor_printf(mon, " policy: %s\n",
HostMemPolicy_str(m->value->policy));
visit_complete(v, &str);