From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flLiW-00041N-QH for qemu-devel@nongnu.org; Thu, 02 Aug 2018 18:05:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1flLiV-00047B-UO for qemu-devel@nongnu.org; Thu, 02 Aug 2018 18:05:08 -0400 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]:41531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1flLiV-00046f-Nw for qemu-devel@nongnu.org; Thu, 02 Aug 2018 18:05:07 -0400 Received: by mail-oi0-x242.google.com with SMTP id k12-v6so6300091oiw.8 for ; Thu, 02 Aug 2018 15:05:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180802124345.GA25289@stefanha-x1.localdomain> References: <20180725085944.11856-1-stefanha@redhat.com> <20180725085944.11856-7-stefanha@redhat.com> <20180802124345.GA25289@stefanha-x1.localdomain> From: Peter Maydell Date: Thu, 2 Aug 2018 23:04:46 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH v3 6/7] loader: Implement .hex file loader List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Stefan Hajnoczi , Jim Mussared , =?UTF-8?Q?Steffen_G=C3=B6rtz?= , Su Hang , Liviu Ionescu , Alistair Francis , QEMU Developers , Subbaraya Sundeep , Steffen Gortz , qemu-arm , Joel Stanley , Julia Suvorova On 2 August 2018 at 13:43, Stefan Hajnoczi wrote: > On Mon, Jul 30, 2018 at 07:01:53PM +0100, Peter Maydell wrote: >> I'm still not convinced we want to add another random >> special case only-works-on-one-architecture-and-some-boards >> feature to the -kernel command line option. >> >> Adding it to the "generic loader" device might be more plausible? > > I'm not sure I understand the purpose of the generic loader. > > As a user -kernel is easier than -device > loader,file=,cpu-num=1. > > Can you explain the advantage to moving hex file loading to the generic > loader? It means we have a command line option for loading hex files that works for every board and every CPU architecture. (Similarly, if you want a way to load an ELF file that works the same way for all boards and CPUs, the generic loader is it -- -kernel will not reliably do the job. You can also use it to load more than one ELF file or to load different ELF files for different CPUs, neither of which you can do with -kernel.) -kernel, like all our legacy short options, is, yes, easier to use; it's also a twisted mess of different "do what I mean" functionality that varies depending on the guest CPU architecture and subtype, the machine being emulated, and other random things like "did the user also tell us to start a BIOS image". It mostly means "run a Linux kernel", with some extras wedged in on the side where we thought we could do it without breaking the kernel case. Oh, and we don't document anywhere what it actually does. I'm reluctant to add yet another layer of "do what I mean" to it that only has an effect on a subset of Arm boards. thanks -- PMM