From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0rSN-0006aA-Pq for qemu-devel@nongnu.org; Tue, 16 Dec 2014 07:42:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0rSJ-0003SJ-Gv for qemu-devel@nongnu.org; Tue, 16 Dec 2014 07:42:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0rSJ-0003SF-91 for qemu-devel@nongnu.org; Tue, 16 Dec 2014 07:42:23 -0500 Date: Tue, 16 Dec 2014 12:42:18 +0000 From: "Richard W.M. Jones" Message-ID: <20141216124217.GV15695@redhat.com> References: <1418399932-7658-1-git-send-email-lersek@redhat.com> <1418399932-7658-8-git-send-email-lersek@redhat.com> <54902260.2060105@suse.de> <549023A4.8060106@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v4 7/8] hw/arm: pass pristine kernel image to guest firmware over fw_cfg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Andrew Jones , Laszlo Ersek , Alexander Graf , QEMU Developers On Tue, Dec 16, 2014 at 12:25:41PM +0000, Peter Maydell wrote: > On 16 December 2014 at 12:20, Alexander Graf wrote: > > The patch as is assumes that AArch64 images are always gzipped. I don't > > think this assumption is correct - if you do "make Image" on a kernel > > source tree, you will get an uncompressed Image file. > > > > I think we'd be better off trying to load it as gzip and if it's not > > gzipped, fall back to linear load. > > Ah, I see what you mean. Yes, we need to continue to support > loading non-compressed Images as well as compressed ones, > so this patch needs to do the try-and-fall-back, in the > same way the current loader code does. Hang on, I tested the non-compressed case when I originally submitted the patch. And indeed it does work (still): (using qemu dfa9c2a0f4d0a0c8b2c1449ecdbb1297427e1560) $ cp /boot/vmlinuz-3.18.0-1.fc22.aarch64 /tmp/Image.gz $ gunzip /tmp/Image.gz $ ./aarch64-softmmu/qemu-system-aarch64 -kernel /tmp/Image -append 'console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel' No machine specified, and there is no default. Use -machine help to list supported machines! rjones@mustang:~/d/qemu$ ./aarch64-softmmu/qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel /tmp/Image -append 'console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel' rjones@mustang:~/d/qemu$ rjones@mustang:~/d/qemu$ ./aarch64-softmmu/qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel /tmp/Image -append 'console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel' -serial stdio [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.18.0-1.fc22.aarch64 (mockbuild@apm-mustang-ev3-11.ml3.eng.bos.redhat.com) (gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC) ) #1 SMP Thu Dec 11 11:47:50 UTC 2014 [etc] And for completeness with a compressed kernel: $ ./aarch64-softmmu/qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel /boot/vmlinuz-3.18.0-1.fc22.aarch64 -append 'console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel' -serial stdio [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.18.0-1.fc22.aarch64 (mockbuild@apm-mustang-ev3-11.ml3.eng.bos.redhat.com) (gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC) ) #1 SMP Thu Dec 11 11:47:50 UTC 2014 [ 0.000000] CPU: AArch64 Processor [411fd070] revision 0 [etc] Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW