[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 48/51] qapi: make query-gic-capabilities depend o
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v4 48/51] qapi: make query-gic-capabilities depend on TARGET_ARM |
Date: |
Thu, 11 Jan 2018 22:32:47 +0100 |
Signed-off-by: Marc-André Lureau <address@hidden>
---
qapi-schema.json | 43 -------------------------------------------
qapi/target.json | 45 +++++++++++++++++++++++++++++++++++++++++++++
monitor.c | 11 -----------
target/arm/monitor.c | 2 +-
4 files changed, 46 insertions(+), 55 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index ee9b2f53ff..f444e684c0 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2899,49 +2899,6 @@
##
{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
-##
-# @GICCapability:
-#
-# The struct describes capability for a specific GIC (Generic
-# Interrupt Controller) version. These bits are not only decided by
-# QEMU/KVM software version, but also decided by the hardware that
-# the program is running upon.
-#
-# @version: version of GIC to be described. Currently, only 2 and 3
-# are supported.
-#
-# @emulated: whether current QEMU/hardware supports emulated GIC
-# device in user space.
-#
-# @kernel: whether current QEMU/hardware supports hardware
-# accelerated GIC device in kernel.
-#
-# Since: 2.6
-##
-{ 'struct': 'GICCapability',
- 'data': { 'version': 'int',
- 'emulated': 'bool',
- 'kernel': 'bool' } }
-
-##
-# @query-gic-capabilities:
-#
-# This command is ARM-only. It will return a list of GICCapability
-# objects that describe its capability bits.
-#
-# Returns: a list of GICCapability objects.
-#
-# Since: 2.6
-#
-# Example:
-#
-# -> { "execute": "query-gic-capabilities" }
-# <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
-# { "version": 3, "emulated": false, "kernel": true } ] }
-#
-##
-{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
-
##
# @CpuInstanceProperties:
#
diff --git a/qapi/target.json b/qapi/target.json
index ca463a0854..7494a7e58f 100644
--- a/qapi/target.json
+++ b/qapi/target.json
@@ -132,3 +132,48 @@
'modelb': 'CpuModelInfo' },
'returns': 'CpuModelBaselineInfo',
'if': 'defined(TARGET_S390X)' }
+
+##
+# @GICCapability:
+#
+# The struct describes capability for a specific GIC (Generic
+# Interrupt Controller) version. These bits are not only decided by
+# QEMU/KVM software version, but also decided by the hardware that
+# the program is running upon.
+#
+# @version: version of GIC to be described. Currently, only 2 and 3
+# are supported.
+#
+# @emulated: whether current QEMU/hardware supports emulated GIC
+# device in user space.
+#
+# @kernel: whether current QEMU/hardware supports hardware
+# accelerated GIC device in kernel.
+#
+# Since: 2.6
+##
+{ 'struct': 'GICCapability',
+ 'data': { 'version': 'int',
+ 'emulated': 'bool',
+ 'kernel': 'bool' },
+ 'if': 'defined(TARGET_ARM)' }
+
+##
+# @query-gic-capabilities:
+#
+# This command is ARM-only. It will return a list of GICCapability
+# objects that describe its capability bits.
+#
+# Returns: a list of GICCapability objects.
+#
+# Since: 2.6
+#
+# Example:
+#
+# -> { "execute": "query-gic-capabilities" }
+# <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
+# { "version": 3, "emulated": false, "kernel": true } ] }
+#
+##
+{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
+ 'if': 'defined(TARGET_ARM)' }
diff --git a/monitor.c b/monitor.c
index 5d1ae89421..ed719651d9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -971,9 +971,6 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject
**ret_data,
*/
static void qmp_unregister_commands_hack(void)
{
-#ifndef TARGET_ARM
- qmp_unregister_command(&qmp_commands, "query-gic-capabilities");
-#endif
#if !defined(TARGET_S390X) && !defined(TARGET_I386)
qmp_unregister_command(&qmp_commands, "query-cpu-model-expansion");
#endif
@@ -4135,14 +4132,6 @@ QemuOptsList qemu_mon_opts = {
},
};
-#ifndef TARGET_ARM
-GICCapabilityList *qmp_query_gic_capabilities(Error **errp)
-{
- error_setg(errp, QERR_FEATURE_DISABLED, "query-gic-capabilities");
- return NULL;
-}
-#endif
-
HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
diff --git a/target/arm/monitor.c b/target/arm/monitor.c
index 299cb80ae7..a46b0f98b4 100644
--- a/target/arm/monitor.c
+++ b/target/arm/monitor.c
@@ -20,7 +20,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "qmp-commands.h"
+#include "target-qmp-commands.h"
#include "hw/boards.h"
#include "kvm_arm.h"
--
2.16.0.rc1.1.gef27df75a1
- [Qemu-devel] [PATCH v4 38/51] qapi: add conditions to SPICE type/commands/events on the schema, (continued)
- [Qemu-devel] [PATCH v4 38/51] qapi: add conditions to SPICE type/commands/events on the schema, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 39/51] qapi: add conditions to REPLICATION type/commands on the schema, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 40/51] qapi-commands: don't initialize command list in qmp_init_marshall(), Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 41/51] qapi: add -i/--include filename.h, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 42/51] qapi: add a 'unit' pragma, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 43/51] build-sys: move qmp-introspect per target, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 44/51] build-sys: add a target schema, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 45/51] qapi: make rtc-reset-reinjection depend on TARGET_I386, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 47/51] target.json: add a note about query-cpu* not being s390x-specific, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 46/51] qapi: make s390 commands depend on TARGET_S390X, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 48/51] qapi: make query-gic-capabilities depend on TARGET_ARM,
Marc-André Lureau <=
- [Qemu-devel] [PATCH v4 49/51] qapi: make query-cpu-model-expansion depend on s390 or x86, Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 51/51] qapi: remove qmp_unregister_command(), Marc-André Lureau, 2018/01/11
- [Qemu-devel] [PATCH v4 50/51] qapi: make query-cpu-definitions depend on specific targets, Marc-André Lureau, 2018/01/11