On 2016/9/22 7:10, Wei Liu wrote:
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> index 2924629..118beab 100644
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -408,8 +408,15 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
> }
> }
>
> +
> + rc = libxl__arch_memory_constant(gc, info, state);
> + if (rc < 0) {
> + LOGE(ERROR, "Couldn't get arch constant memory size");
> + return ERROR_FAIL;
> + }
> +
> if (xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb +
> - LIBXL_MAXMEM_CONSTANT) < 0) {
> + LIBXL_MAXMEM_CONSTANT + rc) < 0) {
I think this LIBXL_MAXMEM_CONSTANT should be pushed to your helper
function, too.
So that, we can have all LIBXL_MAXMEM_CONSTANT removed in libxl
functions (see libxl.c and libxl_dom.c)
If we push LIBXL_MAXMEM_CONSTANT to the libxl_arch_memory_constant and
remove it from libxl.c, do we need to call libxl_arch_memory_constant
there in libxl_set_memory_target()?
Thanks,
--
Shannon
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel