|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 4/5] libxl: update vcpus bitmap in retrieved guest config
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@xxxxxxxx>
> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
>
> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |