From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH for 4.6 v3 3/3] xl: handle empty vnuma configuration
Date: Thu, 10 Sep 2015 16:35:40 +0100 [thread overview]
Message-ID: <1441899340.24450.391.camel@citrix.com> (raw)
In-Reply-To: <1441896651-24735-4-git-send-email-wei.liu2@citrix.com>
On Thu, 2015-09-10 at 15:50 +0100, Wei Liu wrote:
> When user specifies vnuma = [], we need to skip the whole parser
> function, otherwise the parser sets b_info->max_memkb to garbage value.
Arguably the bug here is in the code which does so without reference to
num_vnuma (the majority of this function does the right thing if num_vnuma
== 0).
However we may as well short circuit the whole thing regardless of this bug
so:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> tools/libxl/xl_cmdimpl.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index ebbb9a5..7dbf37f 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -1093,6 +1093,9 @@ static void parse_vnuma_config(const XLU_Config
> *config,
> if (xlu_cfg_get_list(config, "vnuma", &vnuma, &num_vnuma, 1))
> return;
>
> + if (!num_vnuma)
> + return;
> +
> b_info->num_vnuma_nodes = num_vnuma;
> b_info->vnuma_nodes = xcalloc(num_vnuma, sizeof(libxl_vnode_info));
> vcpu_parsed = xcalloc(num_vnuma, sizeof(libxl_bitmap));
prev parent reply other threads:[~2015-09-10 15:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 14:50 [PATCH for 4.6 v3 0/3] More vNUMA patches Wei Liu
2015-09-10 14:50 ` [PATCH for 4.6 v3 1/3] libxc: introduce xc_domain_getvnuma Wei Liu
2015-09-10 14:50 ` [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured Wei Liu
2015-09-10 16:10 ` Ian Campbell
2015-09-10 16:15 ` Wei Liu
2015-09-10 16:53 ` Ian Campbell
2015-09-10 17:05 ` Wei Liu
2015-09-11 10:50 ` Ian Campbell
2015-09-11 13:21 ` Ian Campbell
2015-09-11 13:43 ` Wei Liu
2015-09-11 13:59 ` Ian Campbell
2015-09-11 14:11 ` Wei Liu
2015-09-10 14:50 ` [PATCH for 4.6 v3 3/3] xl: handle empty vnuma configuration Wei Liu
2015-09-10 15:35 ` Ian Campbell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441899340.24450.391.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.