From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86/boot: Move/copy sections more efficiently Date: Tue, 29 Sep 2015 11:26:48 +0100 Message-ID: <560A6768.2020501@citrix.com> References: <1443082457-760-1-git-send-email-andrew.cooper3@citrix.com> <5603E3F502000078000A52F8@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5603E3F502000078000A52F8@prv-mh.provo.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: Xen-devel List-Id: xen-devel@lists.xenproject.org On 24/09/15 10:52, Jan Beulich wrote: >>>> On 24.09.15 at 10:14, wrote: >> The ALIGN(STACK_SIZE) actually belongs with .bss.stack_aligned, but >> __init_end still needs page alignment because of the init sections being >> freed and returned to the domheap after boot. > Logically that change makes sense, but ... > >> --- a/xen/arch/x86/xen.lds.S >> +++ b/xen/arch/x86/xen.lds.S >> @@ -158,11 +158,13 @@ SECTIONS >> __xsm_initcall_start = .; >> *(.xsm_initcall.init) >> __xsm_initcall_end = .; >> + >> + . = ALIGN(PAGE_SIZE); >> } :text >> - . = ALIGN(STACK_SIZE); >> __init_end = .; >> >> .bss : { /* BSS */ >> + . = ALIGN(STACK_SIZE); >> __bss_start = .; >> *(.bss.stack_aligned) >> . = ALIGN(PAGE_SIZE); > ... any pages between __init_end and __bss_start will all of the > sudden no longer get freed. I.e. you'll want to move __init_end > as well (which belongs inside some section anyway). Hmm so it does. I will just defer this change to my superpage mapping series which will fix this issue in a slightly different way. ~Andrew