From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH v3 1/9] libxc: reorganize domain builder guest memory allocator Date: Wed, 28 Oct 2015 18:05:34 +0100 Message-ID: <5631005E.5050700@suse.com> References: <1444741878-16610-1-git-send-email-jgross@suse.com> <1444741878-16610-2-git-send-email-jgross@suse.com> <20151028153256.GF18674@zion.uk.xensource.com> <5630EEE9.2000902@suse.com> <20151028162147.GA8097@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151028162147.GA8097@zion.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: Wei Liu Cc: roger.pau@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 10/28/2015 05:21 PM, Wei Liu wrote: > On Wed, Oct 28, 2015 at 04:51:05PM +0100, Juergen Gross wrote: > [...] >>>> +static int xc_dom_alloc_pad(struct xc_dom_image *dom, xen_vaddr_t end) >>>> +{ >>>> + unsigned int page_size = XC_DOM_PAGE_SIZE(dom); >>>> + xen_pfn_t pages; >>>> + >>>> + if ( end & (page_size - 1) ) >>>> { >>>> xc_dom_panic(dom->xch, XC_INTERNAL_ERROR, >>>> "%s: segment start isn't page aligned (0x%" PRIx64 ")", >>> >>> "segment end"? >> >> No. This function is called to add a padding allocation before the start >> of a new segment, which has to start at page boundary. Maybe a comment >> should clarify this. :-) >> > > Heh, I worked out this function was used to add padding segment but > was confused by the dissonance. > > A simpler solution might be just change "end" to "start"? I think it is > sensible because it is the start of the padding. Hmm, or use "boundary" for the variable and in the message. :-) Juergen