From 18da42ee4273a66f240bcca7aa4d8ce3b97b1a77 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Wed, 2 Jul 2025 14:44:11 +0200 Subject: qapi/accel: Move definitions related to accelerators in their own file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract KVM definitions from machine.json to accelerator.json. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Zhao Liu Message-Id: <20250703105540.67664-29-philmd@linaro.org> --- hw/core/machine-qmp-cmds.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/core/machine-qmp-cmds.c') diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index d82043e1c6..1af0f29f7d 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -14,6 +14,7 @@ #include "hw/mem/memory-device.h" #include "qapi/error.h" #include "qapi/qapi-builtin-visit.h" +#include "qapi/qapi-commands-accelerator.h" #include "qapi/qapi-commands-machine.h" #include "qobject/qobject.h" #include "qapi/qobject-input-visitor.h" -- cgit 1.4.1 From 6ca2eba6d3decff61a725c379876e18869521a5d Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Tue, 15 Jul 2025 10:53:49 +0200 Subject: qapi/machine: Add @qom-type field to CpuInfoFast structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Knowing the QOM type name of a CPU can be useful, in particular to infer its model name. Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Xiaoyao Li Message-Id: <20250715090624.52377-2-philmd@linaro.org> --- hw/core/machine-qmp-cmds.c | 1 + qapi/machine.json | 3 +++ 2 files changed, 4 insertions(+) (limited to 'hw/core/machine-qmp-cmds.c') diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 1af0f29f7d..b9e7eb64e0 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -48,6 +48,7 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp) value->cpu_index = cpu->cpu_index; value->qom_path = object_get_canonical_path(OBJECT(cpu)); value->thread_id = cpu->thread_id; + value->qom_type = g_strdup(object_get_typename(OBJECT(cpu))); if (mc->cpu_index_to_instance_props) { CpuInstanceProperties *props; diff --git a/qapi/machine.json b/qapi/machine.json index f80ba264b5..6d3a480bea 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -76,6 +76,8 @@ # # @cpu-index: index of the virtual CPU # +# @qom-type: QOM type name of the CPU (since 10.1) +# # @qom-path: path to the CPU object in the QOM tree # # @thread-id: ID of the underlying host thread @@ -89,6 +91,7 @@ ## { 'union' : 'CpuInfoFast', 'base' : { 'cpu-index' : 'int', + 'qom-type' : 'str', 'qom-path' : 'str', 'thread-id' : 'int', '*props' : 'CpuInstanceProperties', -- cgit 1.4.1