From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aWNvq-0000pa-J5 for mharc-grub-devel@gnu.org; Thu, 18 Feb 2016 07:43:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWNvn-0000oe-MP for grub-devel@gnu.org; Thu, 18 Feb 2016 07:43:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWNvj-0004uM-KA for grub-devel@gnu.org; Thu, 18 Feb 2016 07:43:39 -0500 Received: from mx2.suse.de ([195.135.220.15]:59667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWNvj-0004uH-De for grub-devel@gnu.org; Thu, 18 Feb 2016 07:43:35 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D06D7AD41; Thu, 18 Feb 2016 12:43:33 +0000 (UTC) Subject: Re: [PATCH v3 08/10] xen: add capability to load initrd outside of initial mapping To: Daniel Kiper 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> From: Juergen Gross Message-ID: <56C5BC75.6010506@suse.com> Date: Thu, 18 Feb 2016 13:43:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160218111845.GD3482@olila.local.net-space.pl> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 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 12:43:41 -0000 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()? Juergen