From: Daniel Kiper Subject: Re: [PATCH for-xen-4.5 v4 04/18] x86/boot: use constant in head.S instead of hardcoded value Date: Fri, 17 Oct 2014 18:22:38 +0200 Message-ID: <20141017162238.GH3467@olila.local.net-space.pl> References: <1413555132-22138-1-git-send-email-daniel.kiper@oracle.com> <1413555132-22138-5-git-send-email-daniel.kiper@oracle.com> <54412F29.5010600@citrix.com> <20141017155235.GF3467@olila.local.net-space.pl> <54415D5F020000780003FB98@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XfAIz-0003sK-4r for xen-devel@lists.xenproject.org; Fri, 17 Oct 2014 16:23:05 +0000 Content-Disposition: inline In-Reply-To: <54415D5F020000780003FB98@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 Fri, Oct 17, 2014 at 05:18:07PM +0100, Jan Beulich wrote: > >>> On 17.10.14 at 17:52, wrote: > > On Fri, Oct 17, 2014 at 04:00:57PM +0100, Andrew Cooper wrote: > >> On 17/10/14 15:11, Daniel Kiper wrote: > >> > ..to access multiboot.mem_lower data. > >> > > >> > Signed-off-by: Daniel Kiper > >> > >> Fine, but... > >> > >> > --- > >> > xen/arch/x86/boot/head.S | 2 +- > >> > xen/arch/x86/x86_64/asm-offsets.c | 3 +++ > >> > 2 files changed, 4 insertions(+), 1 deletion(-) > >> > > >> > diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S > >> > index cd43952..0bdbc65 100644 > >> > --- a/xen/arch/x86/boot/head.S > >> > +++ b/xen/arch/x86/boot/head.S > >> > @@ -101,7 +101,7 @@ __start: > >> > */ > >> > testb $MBI_MEMLIMITS,(%ebx) > >> > jz 2f /* not available? BDA value will be > > fine */ > >> > - mov 4(%ebx),%edx > >> > + mov MBI_mem_lower(%ebx),%edx > >> > cmp $0x100,%edx /* is the multiboot value too small? > > */ > >> > jb 2f /* if so, do not use it */ > >> > shl $10-4,%edx > >> > diff --git a/xen/arch/x86/x86_64/asm-offsets.c > > b/xen/arch/x86/x86_64/asm-offsets.c > >> > index 3994f4d..2de9cad 100644 > >> > --- a/xen/arch/x86/x86_64/asm-offsets.c > >> > +++ b/xen/arch/x86/x86_64/asm-offsets.c > >> > @@ -163,6 +163,9 @@ void __dummy__(void) > >> > OFFSET(CPUINFO_features, struct cpuinfo_x86, x86_capability); > >> > BLANK(); > >> > > >> > + OFFSET(MBI_mem_lower, multiboot_info_t, mem_lower); > >> > + BLANK(); > >> > + > >> > OFFSET(MB_flags, multiboot_info_t, flags); > >> > OFFSET(MB_cmdline, multiboot_info_t, cmdline); > >> > >> These are derived from the same struct, so should be declared together, > >> and have consistent naming. > > > > MB_* stuff is removed by patch #6. Later we have MBD_*, MBI_* and MBI2_* > > only. > > But that's no excuse to make things inconsistent here. Applying > some of these initial trivial patches might still be fine for 4.5. OK, please tell me which one from this series you want in 4.5 and I will repost all of them with relevant fixes at the beginning of next week. Daniel