Commit 21161494d8 for qemu.org
commit 21161494d8c4d6be6caed93a56488740ea6372c3
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Tue Sep 9 17:11:54 2025 +0100
hw/core: report security status in query-machines
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 543dd3201b..9c08b17510 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -127,6 +127,7 @@ MachineInfoList *qmp_query_machines(bool has_compat_props, bool compat_props,
if (mc->default_ram_id) {
info->default_ram_id = g_strdup(mc->default_ram_id);
}
+ info->secure = object_class_is_secure(OBJECT_CLASS(mc));
if (compat_props && mc->compat_props) {
int i;
diff --git a/qapi/machine.json b/qapi/machine.json
index de6460f091..b1be5608b6 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -196,6 +196,11 @@
# present when `query-machines` argument @compat-props is true.
# (since 9.1)
#
+# @secure: If true, the machine is declared to provide a security
+# boundary from the guest; if false the machine is either
+# not providing a security boundary, or its status is undefined.
+# (since 11.2)
+#
# Features:
#
# @unstable: Member @compat-props is experimental.
@@ -209,7 +214,8 @@
'deprecated': 'bool', '*default-cpu-type': 'str',
'*default-ram-id': 'str', 'acpi': 'bool',
'*compat-props': { 'type': ['CompatProperty'],
- 'features': ['unstable'] } } }
+ 'features': ['unstable'] },
+ 'secure': 'bool' } }
##
# @query-machines: