From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3oPn-0001jD-Q4 for qemu-devel@nongnu.org; Tue, 21 Aug 2012 09:22:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3oPm-0000R1-AZ for qemu-devel@nongnu.org; Tue, 21 Aug 2012 09:22:39 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:49442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3oPm-0000Qs-5R for qemu-devel@nongnu.org; Tue, 21 Aug 2012 09:22:38 -0400 Received: from /spool/local by e3.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 Aug 2012 09:22:34 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id F21996E8068 for ; Tue, 21 Aug 2012 09:21:53 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7LDLa9F34078756 for ; Tue, 21 Aug 2012 09:21:37 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7LDLacs028438 for ; Tue, 21 Aug 2012 10:21:36 -0300 From: Anthony Liguori In-Reply-To: <20120821100503.GF7982@redhat.com> References: <1345473098-26299-1-git-send-email-berrange@redhat.com> <87ehn1mdzr.fsf@codemonkey.ws> <20120821100503.GF7982@redhat.com> Date: Tue, 21 Aug 2012 08:21:29 -0500 Message-ID: <87lih8s7mu.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] qapi: add 'query-target' command to return target arch/bit size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, Luiz Capitulino "Daniel P. Berrange" writes: > On Mon, Aug 20, 2012 at 04:48:24PM -0500, Anthony Liguori wrote: >> "Daniel P. Berrange" writes: >> >> > From: "Daniel P. Berrange" >> > >> > Add a 'query-target' QAPI command to allow management applications >> > to determine what target architecture a QEMU binary is emulating >> > without having to parse the binary name or -help output >> > >> > $ qmp-shell -p /tmp/qemu >> > (QEMU) query-target >> > { u'return': { u'arch': u'x86_64', u'bits': 64}} >> >> "bits" is really ambiguous. What it means in QEMU (specifically the >> value you are returning) is probably not what you expect it to mean. > > My intent was to indicate the pointer word size for the architecture. > eg 64 for x86_64, ppc64, etc, and 32 and i686, ppc, etc. Probably > should have called it 'wordsize' or something like that So this is physical address size which doesn't necessarily correspond to whether you can run a "64-bit" OS or not. As Peter mentioned, i386 can have a larger physical address size even though it's limited to 32-bit guests. We really don't need to use a physical address size < 64-bit anymore. It's just a matter of time before someone comes in and fixes TARGET_PHYS_ADDR_BITS to 64 which ought to significantly reduce the build time since we don't need to duplicate objects anymore. So yeah, removing 'bits' is probably a good idea. > # virsh capabilities > ....snip... > > hvm > > 32 > /bin/qemu-system-arm > ... > > Currently we just have a table of arch name -> wordsize mapping > data in libvirt. I figured if I was adding a 'query-target' command > to QEMU, we might as well include this info too. It is not critical > though if you'd rather we omitted it though. Does anyone actually use wordsize that libvirt reports? What decisions are made with that information? I'd much rather QEMU provide this kind of information to libvirt but understanding how it's used is important to figure out what to expose. Regards, Anthony Liguori > > Regards, > Daniel > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- http://virt-manager.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|