From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751887AbcDOWxe (ORCPT ); Fri, 15 Apr 2016 18:53:34 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:37747 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbcDOWxc (ORCPT ); Fri, 15 Apr 2016 18:53:32 -0400 Date: Fri, 15 Apr 2016 23:53:28 +0100 From: Matt Fleming To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: Andy Lutomirski , Juergen Gross , "Luis R. Rodriguez" , David Vrabel , Julien Grall , Stefano Stabellini , Andrew Cooper , Boris Ostrovsky , Charles Arndol , Jim Fehlig , Jan Beulich , Daniel Kiper , "H. Peter Anvin" , X86 ML , Gary Lin , Borislav Petkov , joeyli , Jeffrey Cheung , Michael Chang , =?utf-8?Q?Vojt=C4=9Bch_Pavl=C3=ADk?= , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , Linus Torvalds Subject: Re: HVMLite / PVHv2 - using x86 EFI boot entry Message-ID: <20160415225328.GW2829@codeblueprint.co.uk> References: <20160406024027.GX1990@wotan.suse.de> <5704D978.1050101@citrix.com> <20160408204032.GR1990@wotan.suse.de> <570B3228.90400@suse.com> <20160413090202.bg2vfdl3iol7eedv@mac> <20160413101515.GJ2829@codeblueprint.co.uk> <20160413115846.hyt4lg24rfkenbxu@mac> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160413115846.hyt4lg24rfkenbxu@mac> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (Sorry, just realised I never replied to this) On Wed, 13 Apr, at 01:59:10PM, Roger Pau Monné wrote: > > Is this header compatible with the ELF header? Con both co-exist in the > same binary without issues? Nope, they cannot. We get away with mixing bzImage headers and PE/COFF headers for the EFI stub because bzImage has no magic string and contains historical code at the start of the file. The code is never executed in practice nowadays (it tells the user to use a boot loader instead of direct execution) so we just stamp a PE/COFF header over it when CONFIG_EFI_STUB is enabled.