From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v5 10/24] libxl: functions to build vmemranges for PV guest Date: Tue, 17 Feb 2015 14:08:12 +0000 Message-ID: <20150217140812.GE2159@zion.uk.xensource.com> References: <1423770294-9779-1-git-send-email-wei.liu2@citrix.com> <1423770294-9779-11-git-send-email-wei.liu2@citrix.com> <54DE1D18.8070004@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54DE1D18.8070004@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: Andrew Cooper Cc: Wei Liu , ian.campbell@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, JBeulich@suse.com, ufimtseva@gmail.com List-Id: xen-devel@lists.xenproject.org On Fri, Feb 13, 2015 at 03:49:44PM +0000, Andrew Cooper wrote: [...] > > > > + > > +int libxl__vnuma_build_vmemrange_pv_generic(libxl__gc *gc, > > + uint32_t domid, > > + libxl_domain_build_info *b_info, > > + libxl__domain_build_state *state) > > +{ > > + int i; > > + uint64_t next; > > + xen_vmemrange_t *v = NULL; > > + > > + /* Generate one vmemrange for each virtual node. */ > > + GCREALLOC_ARRAY(v, b_info->num_vnuma_nodes); > > + next = 0; > > + for (i = 0; i < b_info->num_vnuma_nodes; i++) { > > + libxl_vnode_info *p = &b_info->vnuma_nodes[i]; > > + > > + v[i].start = next; > > + v[i].end = next + (p->memkb << 10); > > + v[i].flags = 0; > > + v[i].nid = i; > > + > > + next = v[i].end; > > Using "start" and "end", this would appear to have a fencepost error > which a start/size pair wouldn't have. > Are you suggesting I change to use "start" and "size"? If so I don't think that's possible. xen_vmemrange_t is part of the hypervisor interface. Wei.