From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f94Qs-0007Yh-Ra for qemu-devel@nongnu.org; Thu, 19 Apr 2018 03:56:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f94Qp-0005k2-Oa for qemu-devel@nongnu.org; Thu, 19 Apr 2018 03:56:42 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42264 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f94Qp-0005jj-JE for qemu-devel@nongnu.org; Thu, 19 Apr 2018 03:56:39 -0400 Date: Thu, 19 Apr 2018 08:56:29 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Message-ID: <20180419075629.GC10259@redhat.com> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <20180417224054.26363-1-lersek@redhat.com> <87po2wzysh.fsf@dusky.pond.sub.org> <8a52bb49-4194-3b91-8b67-a0e5700fd6ed@redhat.com> <87in8nvdpn.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87in8nvdpn.fsf@dusky.pond.sub.org> Subject: Re: [Qemu-devel] [libvirt] [qemu RFC v2] qapi: add "firmware.json" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Laszlo Ersek , Peter Maydell , Thomas Huth , Peter Krempa , Ard Biesheuvel , libvir-list@redhat.com, Michal Privoznik , qemu-devel@nongnu.org, Alexander Graf , Gary Ching-Pang Lin , Gerd Hoffmann , Paolo Bonzini , David Gibson On Thu, Apr 19, 2018 at 09:48:36AM +0200, Markus Armbruster wrote: > Laszlo Ersek writes: > > > On 04/18/18 10:47, Markus Armbruster wrote: > >> Laszlo Ersek writes: > > > >>> +## > >>> +# @FirmwareArchitecture: > >>> +# > >>> +# Defines the target architectures (emulator binaries) that firmware may > >>> +# execute on. > >>> +# > >>> +# @aarch64: The firmware can be executed by the qemu-system-aarch64 emulator. > >>> +# > >>> +# @arm: The firmware can be executed by the qemu-system-arm emulator. > >>> +# > >>> +# @i386: The firmware can be executed by the qemu-system-i386 emulator. > >>> +# > >>> +# @x86_64: The firmware can be executed by the qemu-system-x86_64 emulator. > >>> +# > >>> +# Since: 2.13 > >>> +## > >>> +{ 'enum' : 'FirmwareArchitecture', > >>> + 'data' : [ 'aarch64', 'arm', 'i386', 'x86_64' ] } > >> > >> Partial dupe of CpuInfoArch from misc.json. Neither covers all our > >> target architectures. Should we have one that does in common.json > >> instead? > > > > If we had one there, I'd use it here :) > > > > For collecting the arch identifiers, is it OK to run "./configure > > --help", and look for the "*-softmmu" options under > > "--target-list=LIST"? Because that's what I need here; the qemu-system-* > > emulators. > > configure gets its list like this: > > default_target_list="" > > mak_wilds="" > > if [ "$softmmu" = "yes" ]; then > mak_wilds="${mak_wilds} $source_path/default-configs/*-softmmu.mak" > fi > if [ "$linux_user" = "yes" ]; then > mak_wilds="${mak_wilds} $source_path/default-configs/*-linux-user.mak" > fi > if [ "$bsd_user" = "yes" ]; then > mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak" > fi > > for config in $mak_wilds; do > default_target_list="${default_target_list} $(basename "$config" .mak)" > done > > Since we use QMP only in system emulation, a QAPI enum limited to the > system emulation targets makes sense. > > Replacing CpuInfoArch by such an enum will change the discriminator > value from "other" to the real architecture, with the obvious > compatibility concerns. But we've accepted similar changes twice > already: commit 9d0306dfdfb and commit 25fa194b7b1, both v2.12.0-rc0. > > "other" was a bad idea. Hindsight 20/20. > > Getting rid of it in one go rather than piecemeal seems like the least > bad way out. Too late for 2.12, though. Eric, what do you think? Given the context in which this "other" value is used, I think it is reasonable to kill it and put a full arch list in there. No app is likely to be accessing the struct under "other" because it is just an empty placeholder. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|