Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934723AbcDMKkI (ORCPT ); Wed, 13 Apr 2016 06:40:08 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36015 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932776AbcDMKkG (ORCPT ); Wed, 13 Apr 2016 06:40:06 -0400 Date: Wed, 13 Apr 2016 11:40:03 +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: <20160413104003.GN2829@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160413101515.GJ2829@codeblueprint.co.uk> 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 Content-Length: 927 Lines: 19 On Wed, 13 Apr, at 11:15:15AM, Matt Fleming wrote: > > For 1. we'd basically be using the PE/COFF file format with the EFI > ABI as an OS agnostic boot protocol, but not as a full firmware > runtime environment. To add some balance to this proposal (since there's no such thing as a free lunch) some of the disadvantages are, The PE/COFF stub in Linux does assume that it is executing in native cpu mode and does not perform any mode switching, i.e. from 32-bit protected to long mode. This is due to the way that EFI works - by the time the OS image entry point is jumped to on a 64-bit cpu we're running in long mode with identity mapped page tables. To be fair, when running Xen on EFI (bare metal) this would save you one cpu mode switch when compared with the current HVMLite proposal. I'm not aware of a direct equivalent for ELF notes in the PE/COFF format. I'm still re-reading the spec to find something suitable.