From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4IUR-0000fS-W4 for qemu-devel@nongnu.org; Wed, 22 Aug 2012 17:29:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4IUQ-0000fg-6P for qemu-devel@nongnu.org; Wed, 22 Aug 2012 17:29:27 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:37773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4IUQ-0000fR-3J for qemu-devel@nongnu.org; Wed, 22 Aug 2012 17:29:26 -0400 Received: from /spool/local by e6.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Aug 2012 17:29:25 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 364326E8041 for ; Wed, 22 Aug 2012 17:29:23 -0400 (EDT) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7MLTMaQ185794 for ; Wed, 22 Aug 2012 17:29:22 -0400 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7MLUhv0017462 for ; Wed, 22 Aug 2012 15:30:43 -0600 From: Anthony Liguori In-Reply-To: <50354683.8070809@redhat.com> References: <1345667067-24298-1-git-send-email-aliguori@us.ibm.com> <50354683.8070809@redhat.com> Date: Wed, 22 Aug 2012 16:29:19 -0500 Message-ID: <878vd64nv4.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Markus Armbruster Eric Blake writes: > On 08/22/2012 02:24 PM, Anthony Liguori wrote: >> This allows any QEMU binary to be executed with: >> >> $QEMU_BINARY -qmp stdio > > Don't you mean: > > $QEMU_BINARY -M none -qmp stdio I did, thanks. > > I agree with including this in 1.2, as otherwise your new query-target > and other commands are incomplete (that is, this is a 'bug fix' of > rounding out a feature already promised at hard freeze, and not a new > feature on its own). > >> +static QEMUMachine machine_none = { >> + .name = "none", >> + .desc = "empty machine", >> + .init = machine_none_init, >> + .max_cpus = 0, >> +}; > > I guess libvirt just blindly tries '-S -M none'; if it works, we must be > talking to new enough qemu (and all the other QMP commands that we want > to probe are then immediately available); Correct. '-M none' will fail with a non-zero exit status in all old versions of QEMU. -S isn't really needed FWIW but it certainly doesn't hurt. There aren't any VCPUs created with -M none so strictly speaking, -S doesn't do anything. No ram is allocated with -M none either which is another nice touch (less resource usage). > if it doesn't work, then we > must be talking to older qemu and can fall back to -help scraping (since > older versions won't be further modifying their -help output now that > they are released). Correct. Regards, Anthony Liguori > I like the idea, although I'm not familiar enough > with this part of the code to know if my review counts for anything: > > Reviewed-by: Eric Blake > > -- > Eric Blake eblake@redhat.com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org