Received: from eggs.gnu.org ([2001:4830:134:3::10]:42607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1braTU-0005hH-Qj for qemu-devel@nongnu.org; Tue, 04 Oct 2016 20:54:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1braTR-0008Ue-Ob for qemu-devel@nongnu.org; Tue, 04 Oct 2016 20:54:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1braTR-0008UT-Id for qemu-devel@nongnu.org; Tue, 04 Oct 2016 20:54:17 -0400 Date: Tue, 4 Oct 2016 21:54:14 -0300 From: Eduardo Habkost Message-ID: <20161005005414.GJ3877@thinpad.lan.raisama.net> References: <1475609115-19293-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475609115-19293-1-git-send-email-ehabkost@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qmp: Disable query-cpu-* commands when they're unavailable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, armbru@redhat.com Cc: peter.maydell@linaro.org, borntraeger@de.ibm.com, agraf@suse.de, dahi@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, jdenemar@redhat.com, david@gibson.dropbear.id.au, eblake@redhat.com, rth@twiddle.net On Tue, Oct 04, 2016 at 04:25:15PM -0300, Eduardo Habkost wrote: > 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 adding a new arch-specific hook: > arch_init_qmp_commands(), that can enable the available QMP > commands (which are now disabled by default). > > Signed-off-by: Eduardo Habkost Eric Blake just pointed me to qmp_unregister_commands_hack(). I will try to move the query-cpu-* rules there, in v2. -- Eduardo