From: Ian Campbell Subject: Re: [PATCH 12/15] xen: arm: initialise dom_{xen, io, cow} Date: Tue, 4 Dec 2012 14:21:13 +0000 Message-ID: <1354630873.15296.1.camel@zakaz.uk.xensource.com> References: <1354622173.2693.72.camel@zakaz.uk.xensource.com> <1354622199-27504-12-git-send-email-ian.campbell@citrix.com> <50BE0615.1090307@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50BE0615.1090307@citrix.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: David Vrabel Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-12-04 at 14:17 +0000, David Vrabel wrote: > On 04/12/12 11:56, Ian Campbell wrote: > > +void __init arch_init_memory(void) > > +{ > > + /* > > + * Initialise our DOMID_XEN domain. > > + * Any Xen-heap pages that we will allow to be mapped will have > > + * their domain field set to dom_xen. > > + */ > > + dom_xen = domain_create(DOMID_XEN, DOMCRF_dummy, 0); > > + BUG_ON(IS_ERR(dom_xen)); > > + > > + /* > > + * Initialise our DOMID_IO domain. > > + * This domain owns I/O pages that are within the range of the page_info > > + * array. Mappings occur at the priv of the caller. > > + */ > > + dom_io = domain_create(DOMID_IO, DOMCRF_dummy, 0); > > + BUG_ON(IS_ERR(dom_io)); > > + > > + /* > > + * Initialise our COW domain. > > + * This domain owns sharable pages. > > + */ > > + dom_cow = domain_create(DOMID_COW, DOMCRF_dummy, 0); > > + BUG_ON(IS_ERR(dom_cow)); > > +} > > This looks like a cut and paste from the x86 code. Should it be > refactored into a common function? Yes, I suppose it should. I guess this is the counterpoint to my observation that there is x86 stuff in generic code ;-) Ian.