From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Guest knowledge of own domid [was: docs: initial documentation for xenstore paths]
Date: Thu, 09 Aug 2012 17:02:59 -0400 [thread overview]
Message-ID: <50242583.3010201@tycho.nsa.gov> (raw)
In-Reply-To: <1343657037-28495-1-git-send-email-ian.campbell@citrix.com>
On 07/30/2012 10:03 AM, Ian Campbell wrote:
> This is based upon my inspection of a system with a single PV domain running
> and is therefore very incomplete.
>
> There are several things I'm not sure of here, mostly marked with XXX in the
> text.
>
> In particular:
>
> - We seem to expose various things to the guest which really it has no need to
> know (at least not via xenstore). e.g. its own domid, its device model pid,
> the size of the video ram, store port and gref.
If the domid key is unneeded/removed, is there a recommended method for
a guest to query its own domid? I don't see a hypercall that returns it
directly, although there is one to return the guest's UUID - which seems
much less useful for a guest to know about itself.
While hypercalls are fairly consistent about accepting DOMID_SELF, a
domain does occasionally need to know its own ID: xenstore permission
changes do not accept DOMID_SELF, 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.
It is possible for a domain to query its own domain ID indirectly, so it
would be difficult to argue that a domain should not be able to obtain
its own ID. One method for a domain to query its own ID is to create an
unbound event channel with remote_domid = DOMID_SELF, and then execute
evtchn_status on the event channel in order to see the resolved domain
id. Querying Xenstore permissions on a newly-created key will show the
local domain as the first entry. Less reliably, the backend paths for
all xenbus devices contain the local and remote domain IDs.
--
Daniel De Graaf
National Security Agency
next prev parent reply other threads:[~2012-08-09 21:02 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 ` Daniel De Graaf [this message]
2012-08-09 21:26 ` Guest knowledge of own domid [was: docs: initial documentation for xenstore paths] 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
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=50242583.3010201@tycho.nsa.gov \
--to=dgdegra@tycho.nsa.gov \
--cc=ian.campbell@citrix.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.