[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/libxl: Update libxl_domain_unpause() to support qemu-xen
commit 8db1a082bc695d71af2b69313d026ab14c96f288 Author: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> AuthorDate: Mon Jul 13 16:45:45 2015 +0800 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Jul 21 14:20:21 2015 +0100 tools/libxl: Update libxl_domain_unpause() to support qemu-xen Currently, libxl_domain_unpause() only supports qemu-xen-traditional. Update it to support qemu-xen. We use libxl__domain_resume_device_model to unpause guest dm. Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 312e261..ff0d616 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1013,8 +1013,6 @@ out: int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid) { GC_INIT(ctx); - char *path; - char *state; int ret, rc = 0; libxl_domain_type type = libxl__domain_type(gc, domid); @@ -1024,14 +1022,11 @@ int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid) } if (type == LIBXL_DOMAIN_TYPE_HVM) { - uint32_t dm_domid = libxl_get_stubdom_id(ctx, domid); - - path = libxl__device_model_xs_path(gc, dm_domid, domid, "/state"); - state = libxl__xs_read(gc, XBT_NULL, path); - if (state != NULL && !strcmp(state, "paused")) { - libxl__qemu_traditional_cmd(gc, domid, "continue"); - libxl__wait_for_device_model_deprecated(gc, domid, "running", - NULL, NULL, NULL); + rc = libxl__domain_resume_device_model(gc, domid); + if (rc < 0) { + LOG(ERROR, "failed to unpause device model for domain %u:%d", + domid, rc); + goto out; } } ret = xc_domain_unpause(ctx->xch, domid); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |