From: Wei Liu <wei.liu2@citrix.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>,
Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH v4 4/5] libxl: update vcpus bitmap in retrieved guest config
Date: Mon, 11 Jul 2016 17:24:31 +0100 [thread overview]
Message-ID: <20160711162431.GE13434@citrix.com> (raw)
In-Reply-To: <22403.49554.687327.708392@mariner.uk.xensource.com>
On Mon, Jul 11, 2016 at 04:56:02PM +0100, Ian Jackson wrote:
> Wei Liu writes ("[PATCH v4 4/5] libxl: update vcpus bitmap in retrieved guest config"):
> > ... because the available vcpu bitmap can change during domain life time
> > due to cpu hotplug and unplug.
> >
> > For QEMU upstream, we interrogate QEMU for the number of vcpus. For
> > others, we look directly into xenstore for information.
> >
> > Reported-by: Jan Beulich <jbeulich@suse.com>
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Sorry I just realise there is one hunk I forgot to commit.
The hunk is (on top of this patch) to use libxl__xs_read_checked
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index e4b0424..e49741d 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -7305,8 +7305,10 @@ static int libxl__update_avail_vcpus_xenstore(libxl__gc *gc, uint32_t domid,
for (i = 0; i < max_vcpus; i++) {
const char *path = GCSPRINTF("%s/cpu/%u/availability", dompath, i);
- const char *content = libxl__xs_read(gc, XBT_NULL, path);
- if (!strcmp(content, "online"))
+ const char *content;
+ rc = libxl__xs_read_checked(gc, XBT_NULL, path, &content);
+ if (rc) goto out;
+ if (content && !strcmp(content, "online"))
libxl_bitmap_set(map, i);
}
Is it ok to keep your ack?
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-11 16:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 15:49 [PATCH v4 0/5] libxl: update available vcpus map in retrieved configuration Wei Liu
2016-07-11 15:49 ` [PATCH v4 1/5] libxl: constify copy and length calculation functions Wei Liu
2016-07-11 15:52 ` Ian Jackson
2016-07-11 15:49 ` [PATCH v4 2/5] libxl: libxl_domain_need_memory shouldn't modify b_info Wei Liu
2016-07-11 15:52 ` Ian Jackson
2016-07-11 15:49 ` [PATCH v4 3/5] libxl: introduce libxl__qmp_query_cpus Wei Liu
2016-07-11 15:49 ` [PATCH v4 4/5] libxl: update vcpus bitmap in retrieved guest config Wei Liu
2016-07-11 15:56 ` Ian Jackson
2016-07-11 16:24 ` Wei Liu [this message]
2016-07-11 16:38 ` Ian Jackson
2016-07-11 15:49 ` [PATCH v4 5/5] libxl: only issue cpu-add call to QEMU for not present CPU Wei Liu
2016-07-11 15:56 ` Ian Jackson
2016-07-12 13:40 ` [PATCH v4 0/5] libxl: update available vcpus map in retrieved configuration Wei Liu
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=20160711162431.GE13434@citrix.com \
--to=wei.liu2@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=ian.jackson@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).