From: Tim Deegan Subject: Re: [PATCH 05/11] x86/altp2m: basic data structures and support routines. Date: Fri, 16 Jan 2015 18:23:34 +0100 Message-ID: <20150116172334.GC48064@deinos.phlegethon.org> References: <1420838801-11704-1-git-send-email-edmund.h.white@intel.com> <1420838801-11704-6-git-send-email-edmund.h.white@intel.com> <20150115164848.GE57240@deinos.phlegethon.org> <54B7FEA802000078000558C0@mail.emea.novell.com> <54B80BC6.50809@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54B80BC6.50809@intel.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: Ed White Cc: keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 10:49 -0800 on 15 Jan (1421315382), Ed White wrote: > On 01/15/2015 08:53 AM, Jan Beulich wrote: > >>>> On 15.01.15 at 17:48, wrote: > >> At 13:26 -0800 on 09 Jan (1420806395), Ed White wrote: > >>> + /* Init alternate p2m data */ > >>> + if ( (d->arch.altp2m_eptp = alloc_xenheap_page()) == NULL ) > >>> + { > >>> + rv = -ENOMEM; > >>> + goto out; > >>> + } > >>> + for (i = 0; i < 512; i++) > >>> + d->arch.altp2m_eptp[i] = ~0ul; > >> > >> This 512 is architectural, I guess? It should have a named constant. > > > > Perhaps even calculated rather than just defined as a plain > > number constant, e.g. (PAGE_SIZE / sizeof(something)). > > There are architectural reasons why it's very unlikely to change > from 512, so I'll just name it if that's OK. Either is fine by me -- I'll leave that beween you and Jan. Cheers, Tim.