From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3lKm-0007YS-GQ for qemu-devel@nongnu.org; Tue, 21 Aug 2012 06:05:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3lKf-0004PY-1x for qemu-devel@nongnu.org; Tue, 21 Aug 2012 06:05:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3lKe-0004PH-Ou for qemu-devel@nongnu.org; Tue, 21 Aug 2012 06:05:08 -0400 Date: Tue, 21 Aug 2012 11:05:03 +0100 From: "Daniel P. Berrange" Message-ID: <20120821100503.GF7982@redhat.com> References: <1345473098-26299-1-git-send-email-berrange@redhat.com> <87ehn1mdzr.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87ehn1mdzr.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] [PATCH] qapi: add 'query-target' command to return target arch/bit size Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Luiz Capitulino 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 > We're going to most likely fix TARGET_PHYS_ADDR_BITS to 64 real soon. Hmm, when I looked at the header in my checkout it already *is* 64 or 32 as I'd expect for the architecture in question. $ grep PHYS_ADDR_BITS */config-target.mak alpha-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 arm-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 cris-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 i386-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 lm32-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 m68k-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 microblazeel-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 microblaze-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 mips64el-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 mips64-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 mipsel-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 mips-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 ppc64-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 ppcemb-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 ppc-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 s390x-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 sh4eb-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 sh4-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 sparc64-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 sparc-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 x86_64-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=64 xtensaeb-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 xtensa-softmmu/config-target.mak:TARGET_PHYS_ADDR_BITS=32 > Why did you include this field? What information are you looking to get > from QEMU and what decisions do you plan to make with it? When libvirt reports the host capabilities it includes the architecture name and wordsize, amongst other things: # 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. 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 :|