Re: [Xen-devel] [PATCH v2] libxl: memory size in kb requires 64 bit variable

2016-07-28 Thread Dario Faggioli
On Thu, 2016-07-28 at 14:48 +0200, Juergen Gross wrote: > On 28/07/16 14:11, Dario Faggioli wrote: > >   > > > +static int libxl__memkb_32to64(libxl_ctx *ctx, int rc, > > > +   uint64_t val64, uint32_t *ptr32) > > > +{ > > > +GC_INIT(ctx); > > > + > > > +if (rc)

Re: [Xen-devel] [PATCH v2] libxl: memory size in kb requires 64 bit variable

2016-07-28 Thread Juergen Gross
On 28/07/16 14:11, Dario Faggioli wrote: > On Fri, 2016-07-22 at 08:53 +0200, Juergen Gross wrote: >> libxl_set_memory_target() and several other interface functions of >> libxl use a 32 bit sized parameter for a memory size value in kBytes. >> This limits the maximum size to be passed in such a pa

Re: [Xen-devel] [PATCH v2] libxl: memory size in kb requires 64 bit variable

2016-07-28 Thread Dario Faggioli
On Fri, 2016-07-22 at 08:53 +0200, Juergen Gross wrote: > libxl_set_memory_target() and several other interface functions of > libxl use a 32 bit sized parameter for a memory size value in kBytes. > This limits the maximum size to be passed in such a parameter > depending on signedness of the param

[Xen-devel] [PATCH v2] libxl: memory size in kb requires 64 bit variable

2016-07-21 Thread Juergen Gross
libxl_set_memory_target() and several other interface functions of libxl use a 32 bit sized parameter for a memory size value in kBytes. This limits the maximum size to be passed in such a parameter depending on signedness of the parameter to 2TB or 4TB. Correct this by using 64 bit types. Signed