|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] libxl: memory size in kb requires 64 bit variable
On Thu, Jul 28, 2016 at 03:35:19PM +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 parameter to 2TB or 4TB.
>
> Correct this by using 64 bit types.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> ---
[...]
> +static int libxl__memkb_64to32(libxl_ctx *ctx, int rc,
> + uint64_t val64, uint32_t *ptr32)
> +{
It's a bit unusual for an internal function to take ctx. But I think you
want to avoid code repetition in the compact functions.
I can live with this.
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
And thanks Dario for reviewing.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |