All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH] libxl: create xenstore nodes for control/feature-XXX flags
Date: Mon, 1 Aug 2016 15:19:35 +0100	[thread overview]
Message-ID: <20160801141935.GO22419@citrix.com> (raw)
In-Reply-To: <1470041830-524-1-git-send-email-paul.durrant@citrix.com>

On Mon, Aug 01, 2016 at 09:57:10AM +0100, Paul Durrant wrote:
> The xenstore-paths documentation specifies various control/feature-XXX
> flags to allow a guest to tell a toolstack about its abilities to
> respond to values written to control/shutdown. However, because the
> parent control xenstore key is created read-only to the guest, unless
> empty nodes for the feature flags are also created reat/write by the
> toolstack, the guest will not be able to set any flags.
> 
> This patch adds code to create all specified feature flag nodes at
> domain creation time.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>

This is in accordance with docs/mis/xenstore-paths.markdown.

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

> ---
>  tools/libxl/libxl_create.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index 828f254..03b6339 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -646,6 +646,23 @@ retry_transaction:
>                      GCSPRINTF("%s/control/shutdown", dom_path),
>                      rwperm, ARRAY_SIZE(rwperm));
>      libxl__xs_mknod(gc, t,
> +                    GCSPRINTF("%s/control/feature-poweroff", dom_path),
> +                    rwperm, ARRAY_SIZE(rwperm));
> +    libxl__xs_mknod(gc, t,
> +                    GCSPRINTF("%s/control/feature-reboot", dom_path),
> +                    rwperm, ARRAY_SIZE(rwperm));
> +    libxl__xs_mknod(gc, t,
> +                    GCSPRINTF("%s/control/feature-suspend", dom_path),
> +                    rwperm, ARRAY_SIZE(rwperm));
> +    if (info->type == LIBXL_DOMAIN_TYPE_HVM) {
> +        libxl__xs_mknod(gc, t,
> +                        GCSPRINTF("%s/control/feature-s3", dom_path),
> +                        rwperm, ARRAY_SIZE(rwperm));
> +        libxl__xs_mknod(gc, t,
> +                        GCSPRINTF("%s/control/feature-s4", dom_path),
> +                        rwperm, ARRAY_SIZE(rwperm));
> +    }
> +    libxl__xs_mknod(gc, t,
>                      GCSPRINTF("%s/device/suspend/event-channel", dom_path),
>                      rwperm, ARRAY_SIZE(rwperm));
>      libxl__xs_mknod(gc, t,
> -- 
> 2.1.4
> 

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

  reply	other threads:[~2016-08-01 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01  8:57 [PATCH] libxl: create xenstore nodes for control/feature-XXX flags Paul Durrant
2016-08-01 14:19 ` Wei Liu [this message]
2016-08-02 16:04   ` 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=20160801141935.GO22419@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=paul.durrant@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.