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

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



On Mon, 2013-09-23 at 12:30 +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.

These sorts of changes need a patch against docs/misc/xenstore-paths.txt
too.

>  This also applies to Qemu which needs a
> /local/<domid>/device-model xenstore directory.

Is this a new requirement or a separate preexisting issue? How have we
lived without it?

> This patch creates the mentioned directories for each guest launched
> from libxl.

I don't really like leaking toolstack "internals" into the normal guest
namespace. Can we add an option to specify "this is a toolstack domain"
and key off that?

I also wonder if this shouldn't be /libxl/<domid> at the top level.

> Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
>  tools/libxl/libxl_create.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> 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®.