]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qapi/accel: Move definitions related to accelerators in their own file
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 2 Jul 2025 12:44:11 +0000 (14:44 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 15 Jul 2025 17:28:02 +0000 (19:28 +0200)
Extract KVM definitions from machine.json to accelerator.json.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20250703105540.67664-29-philmd@linaro.org>

MAINTAINERS
hw/core/machine-hmp-cmds.c
hw/core/machine-qmp-cmds.c
qapi/accelerator.json [new file with mode: 0644]
qapi/machine.json
qapi/meson.build
qapi/qapi-schema.json

index e88ed2c0a974122fffce8ee636d4f48e2dacf7ba..0e945f3bd260abe12e32db2b580e9200764376b4 100644 (file)
@@ -509,6 +509,7 @@ F: accel/Makefile.objs
 F: accel/stubs/Makefile.objs
 F: cpu-common.c
 F: cpu-target.c
+F: qapi/accelerator.json
 F: system/cpus.c
 
 Apple Silicon HVF CPUs
index c6325cdcaaa711e2c5e36b9f0bc8d71562efcd7c..5ca0da77b141cb79b3e2d3f7ae3cb2cbe6d48fc0 100644 (file)
@@ -18,6 +18,7 @@
 #include "monitor/monitor.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/qdict.h"
 #include "qapi/string-output-visitor.h"
index d82043e1c6874a7fcaa805b76ba74697e94b066d..1af0f29f7d390f422e59faa175328fd15775ce5d 100644 (file)
@@ -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"
diff --git a/qapi/accelerator.json b/qapi/accelerator.json
new file mode 100644 (file)
index 0000000..d55fe1a
--- /dev/null
@@ -0,0 +1,39 @@
+# -*- Mode: Python -*-
+# vim: filetype=python
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+##
+# = Accelerators
+##
+
+{ 'include': 'common.json' }
+
+##
+# @KvmInfo:
+#
+# Information about support for KVM acceleration
+#
+# @enabled: true if KVM acceleration is active
+#
+# @present: true if KVM acceleration is built into this executable
+#
+# Since: 0.14
+##
+{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
+
+##
+# @query-kvm:
+#
+# Return information about KVM acceleration
+#
+# Returns: @KvmInfo
+#
+# Since: 0.14
+#
+# .. qmp-example::
+#
+#     -> { "execute": "query-kvm" }
+#     <- { "return": { "enabled": true, "present": true } }
+##
+{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
index f712e7da6d6b8d082990552b13b1f759cd41d78e..f80ba264b53005c03313efe2932f05c3948675d8 100644 (file)
 ##
 { 'command': 'inject-nmi' }
 
-##
-# @KvmInfo:
-#
-# Information about support for KVM acceleration
-#
-# @enabled: true if KVM acceleration is active
-#
-# @present: true if KVM acceleration is built into this executable
-#
-# Since: 0.14
-##
-{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
-
-##
-# @query-kvm:
-#
-# Return information about KVM acceleration
-#
-# Returns: @KvmInfo
-#
-# Since: 0.14
-#
-# .. qmp-example::
-#
-#     -> { "execute": "query-kvm" }
-#     <- { "return": { "enabled": true, "present": true } }
-##
-{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
-
 ##
 # @NumaOptionsType:
 #
index 3b035aea339fa2f7ec017829479bc931383eac97..ca6b61a608d03ef73764c64405b07f1e497b02d2 100644 (file)
@@ -57,6 +57,7 @@ qapi_all_modules = [
 ]
 if have_system
   qapi_all_modules += [
+    'accelerator',
     'acpi',
     'audio',
     'cryptodev',
index a8f66163cb7086f78bd7c69313ae0523f6490459..0477696ff02f3407c0f81cff723374ab406b33e1 100644 (file)
@@ -37,6 +37,7 @@
 { 'include': 'run-state.json' }
 { 'include': 'crypto.json' }
 { 'include': 'job.json' }
+{ 'include': 'accelerator.json' }
 { 'include': 'block.json' }
 { 'include': 'block-export.json' }
 { 'include': 'char.json' }