From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGJfE-0004EG-SP for qemu-devel@nongnu.org; Fri, 24 Jun 2016 01:28:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGJfA-0008KJ-Og for qemu-devel@nongnu.org; Fri, 24 Jun 2016 01:28:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGJfA-0008Jy-Ij for qemu-devel@nongnu.org; Fri, 24 Jun 2016 01:28:20 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D16680088 for ; Fri, 24 Jun 2016 05:28:20 +0000 (UTC) Date: Fri, 24 Jun 2016 07:28:14 +0200 From: Igor Mammedov Message-ID: <20160624072814.0e2843d1@igors-macbook-pro.local> In-Reply-To: <20160624145651.16a2dbc4@voom.fritz.box> References: <6a52d9a67cc72abb874c9906df039d11bfe1e18d.1466713052.git.pkrempa@redhat.com> <20160624125617.54dc1fc9@voom.fritz.box> <576CADC5.6020602@redhat.com> <20160624145651.16a2dbc4@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] qapi: Report support for -device cpu hotplug in query-machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Eric Blake , Peter Krempa , qemu-devel@nongnu.org On Fri, 24 Jun 2016 14:56:51 +1000 David Gibson wrote: > On Thu, 23 Jun 2016 21:49:25 -0600 > Eric Blake wrote: > > > On 06/23/2016 08:56 PM, David Gibson wrote: > > > On Thu, 23 Jun 2016 22:23:23 +0200 > > > Peter Krempa wrote: > > > > > >> For management apps it's very useful to know whether the selected > > >> machine type supports cpu hotplug via the new -device approach. > > >> Using the presence of 'query-hotpluggable-cpus' is enough for a > > >> withess. > > > > > > > > I'd been under the impression that there was a general way of > > > detecting the availability of a particular qmp command. Was I > > > mistaken? > > > > You are correct - query-commands says whether > > 'query-hotpluggable-cpus' exists as a command. But that is > > insufficient. See my review, or the v2 patch, where the above poor > > wording was corrected to say what was really meant: knowing whether > > query-hotpluggable-cpus exists is insufficient to tell you whether > > a given cpu type can be hotplugged. So adding one more piece of > > witness (for every type of cpu supported, we also advertise if it > > is hotpluggable) is enough for libvirt to efficiently take > > advantage of the new query-hotpluggable-cpus > > command. > > Ah, right. Or to put it another way, the availability of > query-hotpluggable-cpus is global across qemu, whereas actually being > able to use it for hotplug is per machine type. > > Would it be possible to do this instead by attempting to invoke > query-hopluggable-cpus and seeing if it returns any information? This sounds like a better way, for x86 we can set query-hotpluggable-cpus hook to NULL for old machine types so that it would return error that it's not supported. > >