[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 09/11] qmp: Disable query-cpu-* commands when they
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL v2 09/11] qmp: Disable query-cpu-* commands when they're unavailable |
Date: |
Fri, 7 Oct 2016 20:16:20 +0200 |
From: Eduardo Habkost <address@hidden>
Instead of requiring clients to actually call the query-cpu-*
commands to find out if they are implemented, remove them from
the output of "query-commands", so clients know they are not
available.
This is implemented by extending the existing hack at
qmp_unregister_commands_hack(). I wish I could avoid adding even
more #ifdefs to that code, but that's the solution we have today.
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
monitor.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/monitor.c b/monitor.c
index 83c4edf..4ff74b7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -992,6 +992,15 @@ static void qmp_unregister_commands_hack(void)
#ifndef TARGET_ARM
qmp_unregister_command("query-gic-capabilities");
#endif
+#if !defined(TARGET_S390X)
+ qmp_unregister_command("query-cpu-model-expansion");
+ qmp_unregister_command("query-cpu-model-baseline");
+ qmp_unregister_command("query-cpu-model-comparison");
+#endif
+#if !defined(TARGET_PPC) && !defined(TARGET_ARM) && !defined(TARGET_I386) \
+ && !defined(TARGET_S390X)
+ qmp_unregister_command("query-cpu-definitions");
+#endif
}
static void qmp_init_marshal(void)
--
2.5.5
- [Qemu-devel] [PULL v2 00/11] QAPI patches for 2016-10-07, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 04/11] qapi: add assert about root value, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 10/11] docs: Belatedly update for move of qmp-commands.txt, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 11/11] docs: Belatedly update for move of QMP/* to docs/, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 03/11] tests/test-qmp-input-strict: Cover missing struct members, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 06/11] qapi: return a 'missing parameter' error, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 05/11] qapi: assert list entry has a value, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 01/11] qmp: fix object-add assert() without props, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 09/11] qmp: Disable query-cpu-* commands when they're unavailable,
Markus Armbruster <=
- [Qemu-devel] [PULL v2 07/11] MAINTAINERS: Pass the HMP staff from Luiz to David, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 08/11] MAINTAINERS: Pass the QObject staff from Luiz to Markus, Markus Armbruster, 2016/10/07
- [Qemu-devel] [PULL v2 02/11] qapi: Fix crash when 'any' or 'null' parameter is missing, Markus Armbruster, 2016/10/07
- Re: [Qemu-devel] [PULL v2 00/11] QAPI patches for 2016-10-07, Peter Maydell, 2016/10/10