Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aWSGE-0002NM-TU for mharc-grub-devel@gnu.org; Thu, 18 Feb 2016 12:21:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWSGC-0002MU-1d for grub-devel@gnu.org; Thu, 18 Feb 2016 12:21:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWSG8-0006fx-QA for grub-devel@gnu.org; Thu, 18 Feb 2016 12:20:59 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:41957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWSG8-0006f8-Hn for grub-devel@gnu.org; Thu, 18 Feb 2016 12:20:56 -0500 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1IHKoX7029467 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 18 Feb 2016 17:20:51 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u1IHKolk014706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 18 Feb 2016 17:20:50 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u1IHKitQ026071; Thu, 18 Feb 2016 17:20:49 GMT Received: from olila.local.net-space.pl (/10.175.243.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 18 Feb 2016 09:20:38 -0800 Date: Thu, 18 Feb 2016 18:20:35 +0100 From: Daniel Kiper To: Juergen Gross Subject: Re: [PATCH v3 08/10] xen: add capability to load initrd outside of initial mapping Message-ID: <20160218172035.GJ3482@olila.local.net-space.pl> References: <1455729577-23702-1-git-send-email-jgross@suse.com> <1455729577-23702-9-git-send-email-jgross@suse.com> <20160218111845.GD3482@olila.local.net-space.pl> <56C5BC75.6010506@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56C5BC75.6010506@suse.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 Cc: grub-devel@gnu.org, phcoder@gmail.com, mchang@suse.com, xen-devel@lists.xen.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: Thu, 18 Feb 2016 17:21:01 -0000 On Thu, Feb 18, 2016 at 01:43:33PM +0100, Juergen Gross wrote: > On 18/02/16 12:18, Daniel Kiper wrote: > > On Wed, Feb 17, 2016 at 06:19:35PM +0100, Juergen Gross wrote: > >> Modern pvops linux kernels support an initrd not covered by the initial > >> mapping. This capability is flagged by an elf-note. > >> > >> In case the elf-note is set by the kernel don't place the initrd into > >> the initial mapping. This will allow to load larger initrds and/or > >> support domains with larger memory, as the initial mapping is limited > >> to 2GB and it is containing the p2m list. > >> > >> Signed-off-by: Juergen Gross > > > > One nitpick. > > > > Reviewed-by: Daniel Kiper > > > >> --- > >> grub-core/loader/i386/xen.c | 61 ++++++++++++++++++++++++++++++-------- > >> grub-core/loader/i386/xen_fileXX.c | 3 ++ > >> include/grub/xen_file.h | 1 + > >> 3 files changed, 52 insertions(+), 13 deletions(-) > >> > >> diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c > >> index 3bcf4c8..7ac74f6 100644 > >> --- a/grub-core/loader/i386/xen.c > >> +++ b/grub-core/loader/i386/xen.c > >> @@ -58,6 +58,7 @@ struct xen_loader_state { > >> grub_uint64_t modules_target_start; > >> grub_size_t n_modules; > >> int loaded; > >> + int alloc_end_called; > >> }; > >> > >> static struct xen_loader_state xen_state; > >> @@ -320,6 +321,28 @@ grub_xen_pt_alloc (void) > >> } > >> > >> static grub_err_t > >> +grub_xen_alloc_end (void) > > > > Why is it called grub_xen_alloc_end()? > > Could we use just grub_xen_alloc()? > > We could, of course. I just wanted to make clear that this function will > do the allocations needed to be at the end of the allocation process. > Naming it grub_xen_alloc() would make it occur to be a very basic > allocation function, which just isn't true. What about > grub_xen_alloc_rest()? My order of preference is: grub_xen_alloc_final() or grub_xen_alloc_last() or grub_xen_alloc_end() or grub_xen_alloc_rest(). Choose one which is best for you. Daniel