[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 --for 4.6 COLOPre 16/25] tools/libxl: Update libxl_domain_unpause() to support qemu-xen



On Wed, Jul 15, 2015 at 03:45:42PM +0800, Yang Hongyang wrote:
> 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>

I think I suggested this, too.

With Ian's comment addressed:

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

> ---
>  tools/libxl/libxl.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 5b2d045..799aead 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -941,8 +941,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);
> @@ -952,14 +950,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) {
> +            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "failed to unpause device 
> model "
> +                       "for domain %u:%d", domid, rc);
> +            goto out;
>          }
>      }
>      ret = xc_domain_unpause(ctx->xch, domid);
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.