Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZQEQK-0000rP-Mw for mharc-grub-devel@gnu.org; Fri, 14 Aug 2015 08:49:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQEQI-0000qq-9o for grub-devel@gnu.org; Fri, 14 Aug 2015 08:49:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQEQD-0003bY-NP for grub-devel@gnu.org; Fri, 14 Aug 2015 08:49:26 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:39391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQEQD-0003bC-Fx for grub-devel@gnu.org; Fri, 14 Aug 2015 08:49:21 -0400 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Fri, 14 Aug 2015 06:49:19 -0600 Message-Id: <55CDFFEE020000780009B0B0@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Fri, 14 Aug 2015 06:49:18 -0600 From: "Jan Beulich" To: "Daniel Kiper" Subject: Re: [Xen-devel] [PATCH v2 22/23] x86: make Xen early boot code relocatable References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-23-git-send-email-daniel.kiper@oracle.com> <20150811164806.GB32231@l.oracle.com> <20150814115205.GA8034@olila.local.net-space.pl> In-Reply-To: <20150814115205.GA8034@olila.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 137.65.248.74 Cc: Juergen Gross , grub-devel@gnu.org, wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, phcoder@gmail.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, keir@xen.org, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 12:49:27 -0000 >>> On 14.08.15 at 13:52, wrote: > On Tue, Aug 11, 2015 at 12:48:06PM -0400, Konrad Rzeszutek Wilk wrote: >> On Mon, Jul 20, 2015 at 04:29:17PM +0200, Daniel Kiper wrote: >> > diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h >> > index 87b3341..27481ac 100644 >> > --- a/xen/include/asm-x86/page.h >> > +++ b/xen/include/asm-x86/page.h >> > @@ -283,7 +283,7 @@ extern root_pgentry_t idle_pg_table[ROOT_PAGETABLE= _ENTRIES]; >> > extern l2_pgentry_t *compat_idle_pg_table_l2; >> > extern unsigned int m2p_compat_vstart; >> > extern l2_pgentry_t l2_xenmap[L2_PAGETABLE_ENTRIES], >> > - l2_bootmap[L2_PAGETABLE_ENTRIES]; >> > + l2_bootmap[4*L2_PAGETABLE_ENTRIES]; >> >> ? Why do we need to expand this to be 16kB? >=20 > TBH, we need 8 KiB in the worst case. The worst case is when > next GiB starts (e.g. 1 GiB ends and 2 GiB starts) in the middle > of Xen image. In this situation we must hook up lower l2_bootmap > table with lower l3_bootmap entry, higher l2_bootmap table with > higher l3_bootmap entry and finally fill l2_bootmap relevant > tables in proper way. Sadly, this method requires more calculations. > To avoid that I have added 3 l2_bootmap tables and simply hook up > one after another with relevant l3_bootmap entries. However, if > you wish we can reduce number of l2_bootmap tables to two. This > way code will be more complicated but we will save about 8 KiB. Wouldn't it be better (simpler) to enforce, say, 16Mb alignment in the PE32+ header (which the EFI loader would then honor)? Jan