* [PATCH v2] qapi: Add 'acpi' field to 'query-machines' output
@ 2023-02-28 8:12 Peter Krempa
2023-03-01 9:55 ` Peter Krempa
2023-03-01 10:37 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Peter Krempa @ 2023-02-28 8:12 UTC (permalink / raw)
To: qemu-devel
Cc: Eduardo Habkost, Marcel Apfelbaum, Philippe Mathieu-Daudé,
Yanan Wang, Eric Blake, Markus Armbruster
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 <pkrempa@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
---
Diff to v1:
- Fix spelling of 'ACPI' in 'machine.json'
- Removed addition of a field to 'struct MachineClass' which was not
used in the final version
hw/core/machine-qmp-cmds.c | 1 +
qapi/machine.json | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 2d904747c0..b98ff15089 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);
}
diff --git a/qapi/machine.json b/qapi/machine.json
index b9228a5e46..604b686e59 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -155,6 +155,8 @@
#
# @default-ram-id: the default ID of initial RAM memory backend (since 5.2)
#
+# @acpi: machine type supports ACPI (since 8.0)
+#
# Since: 1.2
##
{ 'struct': 'MachineInfo',
@@ -162,7 +164,7 @@
'*is-default': 'bool', 'cpu-max': 'int',
'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
'deprecated': 'bool', '*default-cpu-type': 'str',
- '*default-ram-id': 'str' } }
+ '*default-ram-id': 'str', 'acpi': 'bool' } }
##
# @query-machines:
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] qapi: Add 'acpi' field to 'query-machines' output
2023-02-28 8:12 [PATCH v2] qapi: Add 'acpi' field to 'query-machines' output Peter Krempa
@ 2023-03-01 9:55 ` Peter Krempa
2023-03-01 10:37 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Peter Krempa @ 2023-03-01 9:55 UTC (permalink / raw)
To: qemu-devel
Cc: Eduardo Habkost, Marcel Apfelbaum, Philippe Mathieu-Daudé,
Yanan Wang, Eric Blake, Markus Armbruster
On Tue, Feb 28, 2023 at 09:12:34 +0100, Peter Krempa wrote:
> 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 <pkrempa@redhat.com>
> Acked-by: Markus Armbruster <armbru@redhat.com>
> ---
>
> Diff to v1:
> - Fix spelling of 'ACPI' in 'machine.json'
> - Removed addition of a field to 'struct MachineClass' which was not
> used in the final version
It would be great to get this patch into the release as will allow
libvirt to properly handle setting of ACPI now that '-no-acpi' flag was
recently deprecated:
https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg07926.html
The libvirt patches which make use of this feature were posted at:
https://listman.redhat.com/archives/libvir-list/2023-March/238217.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] qapi: Add 'acpi' field to 'query-machines' output
2023-02-28 8:12 [PATCH v2] qapi: Add 'acpi' field to 'query-machines' output Peter Krempa
2023-03-01 9:55 ` Peter Krempa
@ 2023-03-01 10:37 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2023-03-01 10:37 UTC (permalink / raw)
To: Peter Krempa
Cc: qemu-devel, Eduardo Habkost, Marcel Apfelbaum,
Philippe Mathieu-Daudé, Yanan Wang, Eric Blake,
Markus Armbruster
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-01 10:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28 8:12 [PATCH v2] qapi: Add 'acpi' field to 'query-machines' output Peter Krempa
2023-03-01 9:55 ` Peter Krempa
2023-03-01 10:37 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).