From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v10 5/9] libxl: vnuma types declararion Date: Wed, 3 Sep 2014 16:03:27 +0100 Message-ID: <1409756607.3323.20.camel@kazak.uk.xensource.com> References: <1409718258-3276-1-git-send-email-ufimtseva@gmail.com> <1409718258-3276-3-git-send-email-ufimtseva@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409718258-3276-3-git-send-email-ufimtseva@gmail.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: Elena Ufimtseva Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, george.dunlap@eu.citrix.com, msw@linux.com, dario.faggioli@citrix.com, lccycc123@gmail.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On Wed, 2014-09-03 at 00:24 -0400, Elena Ufimtseva wrote: > Adds vnuma topology types declarations to libxl_domain_build_info > structure. Normally we would add the data types along with the implementation rather than splitting it out like this. Anyway, at some point in this series once everything is in place you will need to introduce a LIBXL_HAVE_ define to indicate the availabilty of this feature, (maybe this comes later) > Signed-off-by: Elena Ufimtseva > --- > tools/libxl/libxl_types.idl | 8 +++++++- > tools/libxl/libxl_vnuma.h | 16 ++++++++++++++++ > 2 files changed, 23 insertions(+), 1 deletion(-) > create mode 100644 tools/libxl/libxl_vnuma.h > > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index 08a7927..ea8bac0 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -333,7 +333,13 @@ libxl_domain_build_info = Struct("domain_build_info",[ > ("disable_migrate", libxl_defbool), > ("cpuid", libxl_cpuid_policy_list), > ("blkdev_start", string), > - > + ("vnodes", uint32), > + ("vmemranges", uint32), > + ("vnuma_mem", Array(uint64, "num_vnuma_mem")), > + ("vnuma_vcpumap", Array(uint32, "num_vnuma_vcpumap")), > + ("vdistance", Array(uint32, "num_vdistance")), > + ("vnuma_vnodemap", Array(uint32, "num_vnuma_vnondemap")), > + ("vnuma_autoplacement", libxl_defbool), > ("device_model_version", libxl_device_model_version), > ("device_model_stubdomain", libxl_defbool), > # if you set device_model you must set device_model_version too > diff --git a/tools/libxl/libxl_vnuma.h b/tools/libxl/libxl_vnuma.h > new file mode 100644 > index 0000000..4312070 > --- /dev/null > +++ b/tools/libxl/libxl_vnuma.h > @@ -0,0 +1,16 @@ > +#ifndef LIBXL_VNUMA_H > +#define LIBXL_VNUMA_H > + > +#include "libxl_osdeps.h" /* must come before any other headers */ > + > +#define VNUMA_NO_NODE ~((unsigned int)0) Is this intended to be assigned to e.g. vnume_vnodemap? If so it should probably have the same type (e.g. uint32_t). > + > +/* > + * Min vNUMA node size in MBytes from Linux for x86 architecture. > + * See linux source code arch/x86/include/asm/numa.h > + */ > +#define MIN_VNODE_SIZE (4) > + > +#define MAX_VNUMA_NODES ((unsigned int)1 << 10) (unsigned int)1 is "1U" I think. > + > +#endif