From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v3 6/7] libxl/libxc: Move libxl_get_numainfo()'s hypercall buffer management to libxc Date: Tue, 10 Feb 2015 09:59:22 -0500 Message-ID: <54DA1CCA.9060709__49586.0164789066$1423580481$gmane$org@oracle.com> References: <1423512275-6531-1-git-send-email-boris.ostrovsky@oracle.com> <1423512275-6531-7-git-send-email-boris.ostrovsky@oracle.com> <54D9EF57.7050308@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54D9EF57.7050308@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 , jbeulich@suse.com, keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com Cc: dario.faggioli@citrix.com, port-xen@netbsd.org, ufimtseva@gmail.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 02/10/2015 06:45 AM, Andrew Cooper wrote: > >> >> - memcpy(&sysctl.u.numainfo, put_info, sizeof(*put_info)); >> + sysctl.u.numainfo.max_node_index = *max_nodes - 1; > As you have you have already changed these hypercalls, can we fix the > length handling so it doesn't require +1 or -1. Xen should receive the > length of the arrays, and return the number of elements written, with no > further adjustment necessary. Yes, I should change this too. -boris