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

Re: [Xen-devel] [PATCH v1 04/12] libxl: create a local xenstore libxl and device-model dir for guests



On Wed, 2013-10-02 at 11:24 +0200, Roger Pau Monne wrote:
> If libxl is executed inside a guest domain it needs write access to
> the local libxl xenstore dir (/local/<domid>/libxl) to store internal
> data. This also applies to Qemu which needs a
> /local/<domid>/device-model xenstore directory.
> 
> This patch creates the mentioned directories for each guest launched
> from libxl.

Didn't we decide to make this conditional on building a driver domain?

> 
> Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
> Changes since RFC:
>  * Add documentation for the new paths.
> ---
>  docs/misc/xenstore-paths.markdown |   10 ++++++++++
>  tools/libxl/libxl_create.c        |   12 ++++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/docs/misc/xenstore-paths.markdown 
> b/docs/misc/xenstore-paths.markdown
> index 1c634b5..a8c4c58 100644
> --- a/docs/misc/xenstore-paths.markdown
> +++ b/docs/misc/xenstore-paths.markdown
> @@ -318,6 +318,16 @@ protocol definition.
>  
>  A domain writable path. Available for arbitrary domain use.
>  
> +### Driver domain specific paths
> +
> +#### ~/device-model/$DOMID/state [w]
> +
> +Contains the status of the device models running on the domain.
> +
> +#### ~/libxl/$DOMID/qdisk-backend-pid [w]

Should both of the have BACKEND as a tag too?

And perhaps some tag to indicate that normal guest functions shouldn't
use this, similar perhaps to INTERNAL?

> +
> +Contains the PIDs of the device models running on the domain.
> +
>  ## Virtual Machine Paths
>  
>  The /vm/$UUID namespace is used by toolstacks to store various
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index 0c32d0b..aac19b5 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -498,6 +498,18 @@ retry_transaction:
>      libxl__xs_mkdir(gc, t,
>                      libxl__sprintf(gc, "%s/data", dom_path),
>                      rwperm, ARRAY_SIZE(rwperm));
> +    /*
> +     * Create a local "libxl" directory for each guest, since we might want
> +     * to use libxl from inside the guest
> +     */
> +    libxl__xs_mkdir(gc, t, GCSPRINTF("%s/libxl", dom_path), rwperm,
> +                    ARRAY_SIZE(rwperm));
> +    /*
> +     * Create a local "device-model" directory for each guest, since we
> +     * might want to use Qemu from inside the guest
> +     */
> +    libxl__xs_mkdir(gc, t, GCSPRINTF("%s/device-model", dom_path), rwperm,
> +                    ARRAY_SIZE(rwperm));
>      if (info->type == LIBXL_DOMAIN_TYPE_HVM)
>          libxl__xs_mkdir(gc, t,
>              libxl__sprintf(gc, "%s/hvmloader/generation-id-address", 
> dom_path),



_______________________________________________
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®.