From b97f3147b0a3992ea079d5ce29b755984f30ba4f Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 28 Feb 2023 09:12:34 +0100 Subject: qapi: Add 'acpi' field to 'query-machines' output Report which machine types support ACPI so that management applications can properly use the 'acpi' property even on platforms such as ARM where support for ACPI depends on the machine type and thus checking presence of '-machine acpi=' in 'query-command-line-options' is insufficient. Signed-off-by: Peter Krempa Acked-by: Markus Armbruster Message-Id: <537625d3e25d345052322c42ca19812b98b4f49a.1677571792.git.pkrempa@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/machine-qmp-cmds.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw') diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 2d90474..b98ff15 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -102,6 +102,7 @@ MachineInfoList *qmp_query_machines(Error **errp) info->hotpluggable_cpus = mc->has_hotpluggable_cpus; info->numa_mem_supported = mc->numa_mem_supported; info->deprecated = !!mc->deprecation_reason; + info->acpi = !!object_class_property_find(OBJECT_CLASS(mc), "acpi"); if (mc->default_cpu_type) { info->default_cpu_type = g_strdup(mc->default_cpu_type); } -- cgit v1.1