From patchwork Thu Feb 14 15:22:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 1042248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 440gTk14N8z9s7h for ; Fri, 15 Feb 2019 02:36:10 +1100 (AEDT) Received: from localhost ([127.0.0.1]:50336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guJ3Y-0000aY-5E for incoming@patchwork.ozlabs.org; Thu, 14 Feb 2019 10:36:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guIqv-0007Zf-Au for qemu-devel@nongnu.org; Thu, 14 Feb 2019 10:23:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guIqs-0001al-Bj for qemu-devel@nongnu.org; Thu, 14 Feb 2019 10:23:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guIqr-0001Xe-W7 for qemu-devel@nongnu.org; Thu, 14 Feb 2019 10:23:02 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 12D5F99CE1 for ; Thu, 14 Feb 2019 15:23:01 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-92.ams2.redhat.com [10.36.116.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 951C35E7C4; Thu, 14 Feb 2019 15:22:59 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A66681132C1F; Thu, 14 Feb 2019 16:22:51 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 14 Feb 2019 16:22:50 +0100 Message-Id: <20190214152251.2073-18-armbru@redhat.com> In-Reply-To: <20190214152251.2073-1-armbru@redhat.com> References: <20190214152251.2073-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 14 Feb 2019 15:23:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v5 17/18] qmp: Deprecate query-events in favor of query-qmp-schema X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" query-events doesn't reflect compile-time configuration. Instead of fixing that, deprecate the command in favor of query-qmp-schema. Libvirt prefers query-qmp-schema as of commit 22d7222ec0 "qemu: caps: Don't call 'query-events' when we probe events from QMP schema". It'll be in the next release. Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau --- monitor.c | 5 +++++ qapi/misc.json | 7 +++++-- qemu-deprecated.texi | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 1673db7015..33ccbf3957 100644 --- a/monitor.c +++ b/monitor.c @@ -1099,6 +1099,11 @@ CommandInfoList *qmp_query_commands(Error **errp) EventInfoList *qmp_query_events(Error **errp) { + /* + * TODO This deprecated command is the only user of + * QAPIEvent_str() and QAPIEvent_lookup[]. When the command goes, + * they should go, too. + */ EventInfoList *info, *ev_list = NULL; QAPIEvent e; diff --git a/qapi/misc.json b/qapi/misc.json index 82f9147353..98f59f828a 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -318,12 +318,15 @@ ## # @query-events: # -# Return a list of supported QMP events by this server +# Return information on QMP events. # -# Returns: A list of @EventInfo for all supported events +# Returns: A list of @EventInfo. # # Since: 1.2.0 # +# Note: This command is deprecated, because its output doesn't reflect +# compile-time configuration. Use query-qmp-schema instead. +# # Example: # # -> { "execute": "query-events" } diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 80b0702ad5..fe1a914cae 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -99,6 +99,11 @@ Use ``device_add'' for hotplugging vCPUs instead of ``cpu-add''. See documentation of ``query-hotpluggable-cpus'' for additional details. +@subsection query-events (since 4.0) + +The ``query-events'' command has been superseded by the more powerful +and accurate ``query-qmp-schema'' command. + @section Human Monitor Protocol (HMP) commands @subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (since 3.1)