From: Tim Deegan Subject: Re: [PATCH 15/16] arm: discard boot modules after building domain 0. Date: Thu, 6 Sep 2012 15:03:24 +0100 Message-ID: <20120906140324.GB59973@ocelot.phlegethon.org> References: <1346678886.32462.9.camel@zakaz.uk.xensource.com> <1346679056-8108-15-git-send-email-ian.campbell@citrix.com> <20120906135310.GP56463@ocelot.phlegethon.org> <1346939856.30018.17.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1346939856.30018.17.camel@zakaz.uk.xensource.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: Ian Campbell Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org At 14:57 +0100 on 06 Sep (1346943456), Ian Campbell wrote: > On Thu, 2012-09-06 at 14:53 +0100, Tim Deegan wrote: > > At 13:30 +0000 on 03 Sep (1346679055), Ian Campbell wrote: > > > +void __init discard_initial_modules(void) > > > +{ > > > + struct dt_module_info *mi = &early_info.modules; > > > + int i; > > > + > > > + for ( i = 0; i < mi->nr_mods; i++ ) > > > + { > > > + paddr_t s = mi->module[i].start; > > > + paddr_t e = s + PAGE_ALIGN(mi->module[i].size); > > > + > > > + init_domheap_pages(s, e); > > > > Is there a risk of weirdness from adding non-superpage-aligned memory to > > the domheap here, given that map_domain_page always uses 2MB mappings? > > I hadn't thought about this. > > These regions will mesh precisely with what setup_mm has added and > therefore the result is that the entire 2MB is on the heap, I think. > > These non-aligned looking regions are actually within larger regions of > RAM so I don't think there is any danger of actually mapping some > non-RAM as part of such a 2MB mapping? Righto. We also might care about accidental r/w mappings of r/o things, but since Xen itself is 32MB-aligned that's OK. I think for now this is all fine, so: Acked-by: Tim Deegan though it will need adjustment if Xen becomes module 0, of course. :) Cheers, Tim.