All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Jean Guyader <jean.guyader@gmail.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Guest knowledge of own domid [was: docs: initial documentation for xenstore paths]
Date: Thu, 16 Aug 2012 10:52:21 -0400	[thread overview]
Message-ID: <502D0925.5070705@tycho.nsa.gov> (raw)
In-Reply-To: <1345127814.30865.11.camel@zakaz.uk.xensource.com>

On 08/16/2012 10:36 AM, Ian Campbell wrote:
> On Thu, 2012-08-16 at 15:33 +0100, Daniel De Graaf wrote:
> 
>>>> and if two domains are attempting to
>>>>> set up communication such as V4V or vchan, they need to be able to tell
>>>>> their peer what domain ID to use.
>>>
>>> That's trickier.
>>>
>>> I suppose they could rendezvous via /vm/$UUID? Although there has been
>>> talk of removing that path in the future.
>>
>> The /vm/$UUID path isn't currently useful for this, since it doesn't maintain
>> domain IDs (just names) and doesn't contain writable sub-keys for a domain
>> to use. I also don't think such a sub-key should be added; it makes more
>> sense to keep all of a domain's modifiable keys under its home path.
>>
>> Perhaps this could be changed to another identifier-to-domid mapping, like
>> the proposed addition of a location to map name to domid? 
>>
>> The toolstack would maintain something like:
>>   /local/by-name/$name == domid
>>   /local/by-uuid/$uuid == domid
> 
> This second one is a bit like the existing /vm/$uuid/domid.

That key isn't being populated by xl on my system, so I didn't know it existed.

> 
> I think I would go with:
> 
>   /local/by-name/$name == /local/domain/$domid
>   /local/by-uuid/$uuid == /local/domain/$domid
> 
> though, So that you can just read it and use it without interpreting it.

In that case, you would need to parse the domid out of the string in order
to use it in hypercalls (grant, event, v4v). The frontend/backend paths use
a distinct frontend-id/backend-id key for the domain ID, but we are trying
to avoid this since populating this key would mean the domain populating it
needs to know its own domain ID.

>>   /local/domain/$domid/name - same as existing
>>   /local/domain/$domid/uuid - ? maybe unneeded, as it's available from Xen.
> 
> Is it available for other domains via xen, or just yourself?
> 

Yourself and anyone who can call getdomaininfo (which is usually just dom0).
This is actually the same as the xenstore permissions on keys such as
/local/domain/$id/name. Changing these may need consideration, because on
public hosting servers, you might not want to allow domains to be enumerated
by name.

-- 
Daniel De Graaf
National Security Agency

  reply	other threads:[~2012-08-16 14:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 14:03 [DOCDAY PATCH] docs: initial documentation for xenstore paths Ian Campbell
2012-07-30 16:11 ` [DOCDAY PATCH] docs: update xenstore-paths.markdown with HVM paths Ian Campbell
2012-08-09 10:01 ` [DOCDAY PATCH] docs: initial documentation for xenstore paths Ian Campbell
2012-08-09 13:38   ` Ian Jackson
2012-08-17 14:35     ` Ian Campbell
2012-08-09 14:02   ` Ian Jackson
2012-08-17 15:05     ` Ian Campbell
2012-08-25  8:54       ` Joseph Glanville
2012-09-24 11:35       ` Ian Jackson
2012-09-24 15:07         ` Ian Campbell
2012-08-09 21:02 ` Guest knowledge of own domid [was: docs: initial documentation for xenstore paths] Daniel De Graaf
2012-08-09 21:26   ` Jean Guyader
2012-08-16 11:28     ` Ian Campbell
2012-08-16 14:33       ` Daniel De Graaf
2012-08-16 14:36         ` Ian Campbell
2012-08-16 14:52           ` Daniel De Graaf [this message]
2012-08-17  8:05             ` Ian Campbell

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=502D0925.5070705@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=Ian.Campbell@citrix.com \
    --cc=jean.guyader@gmail.com \
    --cc=xen-devel@lists.xen.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.