From: Daniel Kiper Subject: Re: [PATCH for-xen-4.5 v4 00/18] xen: Break multiboot (v1) dependency and add multiboot2 support Date: Thu, 23 Oct 2014 17:50:20 +0200 Message-ID: <20141023155020.GQ3467@olila.local.net-space.pl> References: <1413555132-22138-1-git-send-email-daniel.kiper@oracle.com> <544146FE020000780003FA95@mail.emea.novell.com> <20141017154936.GE3467@olila.local.net-space.pl> <5448F24D02000078000415FE@mail.emea.novell.com> <5448E1B0.6050301@citrix.com> <20141023145745.GP3467@olila.local.net-space.pl> <54493A3E0200007800041881@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XhKkN-0006YE-DL for xen-devel@lists.xenproject.org; Thu, 23 Oct 2014 15:56:19 +0000 Content-Disposition: inline In-Reply-To: <54493A3E0200007800041881@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Juergen Gross , keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, Andrew Cooper , roy.franz@linaro.org, ning.sun@intel.com, ross.philipson@citrix.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org On Thu, Oct 23, 2014 at 04:26:22PM +0100, Jan Beulich wrote: > >>> On 23.10.14 at 16:57, wrote: > > multiboot1 and multiboot2 are completely different things. If we do what > > you suggest then at least we will be forced to complicate assembly code > > parsing cmdline in xen/arch/x86/boot/cmdline.S. We could also stay with > > multiboot1 stuff but then we will be forced to put all stuff which we are > > able to put in multiboot1. However, we are not able to put at least > > EFI_HANDLE > > and EFI_SYSTEM_TABLE from multiboot2 (which are a must on EFI; maybe we > > want other data from multiboot2 protocol too) in multiboot1 struct because > > there is not designed place for that. It means that we must add another > > global variables which will appear from nowhere in Xen code (as usual > > in case of global variables). > > There's nothing wrong with adding global variables, even less so > when they're __initdata. > > > I understand that gains are not clearly visible at this stage of development > > because there is lack of relevant multiboot2 + EFI code on top of this > > patches. > > However, I hope that above explanation and earlier ones will clear some > > of your doubts. > > > > Guys, if you wish I can do what Jan suggest. However, personally I think > > that it will complicate things more which are already complicated enough. > > I can understand that Xen was tied to multiboot1 protocol at early stage of > > development. Even I am able to understand that this thing was not changed > > during introduction of EFI code. However, I think that right know, when we > > introduce third boot protocol, mutliboot2, there is not longer any excuse to > > have it build in early and in main Xen code especially. So, IMO we should > > do all cleanups and fixes first and then put all multiboot2 + EFI stuff > > on top of it. If we reverse the order then I do not believe that cleanup > > will be done in foreseeable future. > > Repeating the same arguments over and over won't make them any > better. And if MB1, MB2, and EFI are (reasonably) separate rather than > all intermixed, maybe that's going to be the more maintainable state in > the end anyway? We just can't tell without the MB2 pieces (separately) > in place yet. OK, AIUI you suggest that I should parse all multiboot2 data in reloc.c and put all things in multiboot1 struct which lives on trampoline. Then I should add global variables for EFI_HANDLE and EFI_SYSTEM_TABLE somewhere in x86_64.S and initialize them from reloc.c. After that I should call efi_start() immediately after reloc() if Xen runs on EFI platform. Am I right? Daniel