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

Re: [Xen-devel] libvchan-error

On 05/08/2013 03:52 PM, Shakeel Butt wrote:
On Wed, May 8, 2013 at 9:34 AM, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> wrote:
On 05/07/2013 11:43 PM, Shakeel Butt wrote:

On Fri, May 3, 2013 at 7:23 AM, Khandelwal, Shubham
<Shubham.Khandelwal@xxxxxxxxxx> wrote:


I am trying to use the libvchan tool for Inter domain communication for
XEN-ARM on Fast Model for VExpress platform. I have successfully compiled
and ported the following in the rootfs :

libxenvchan.so, libxenvchan.so.1.0, libxenvchan.so.1.0.0, libxenvchan.a,
vchan-node1, vchan-node2.

But when I am using it shows the following error in both dom0 and domU.


# vchan-node1 server read 1 1536

libxenvchan_*_init: No such file or directory


Am I missing some files here ?

Are you running the server in Dom0? If yes then check “xenstore-read
/local/domain/0/domid”, if nothing is there, write 0 to it.

The server side of libvchan reads its id from xenstore and use it to
remove its permission over the nodepath. Not sure why? (CCed to
Daniel, any particular reason)

It does not remove its own permission; instead, it sets itself as the
owner for the nodes when changing permissions. Element 0 in a xenstore
permission list describes owner for the domid and "other" for the r/w
bits, a common source of confusion.

So is "XS_PERM_NONE" for ownership? and not for no access?

No. XS_PERM_NONE means no access, but the permissions in position 0 of the
permission string refer to the access of domains not listed. The domain in
position 0 is the owner; the permissions and domain ID in position 0 are
completely unrelated.

The owner's access is always read/write/owner; only the owner can change
permissions. Dom0 has "superuser" access and can override this.

Reading the "domid" node was the simplest way for a domain to determine
its own domid, which is required to do this.  If dom0 commonly does not
have this node, it may be preferable to switch to making a get-permission
call on the node you just created instead, and assume that you are the
owner of that node.

The server is using domid to set its permission on the nodepath (+ring-ref &
+event-channel) to XS_PERM_NONE. Does this really needed?

Yes, it is; otherwise, you don't know what to put in element 0. Placing any
value other than your own domain ID will be rejected with EPERM since it is
an attempt to change the ownership of the node. Ideally, you would use a
value like DOMID_SELF here, but xenstore doesn't support that.


Shubham Khandelwal

Daniel De Graaf
National Security Agency

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.