All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Omkar Bolla <omkar.bolla@pathpartnertech.com>
Cc: xen-devel@lists.xensource.com, Oleksandr_Andrushchenko@epam.com,
	Oleksandr Andrushchenko <andr2000@gmail.com>,
	Lars Kurth <lars.kurth.xen@gmail.com>,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: Xen PV: Sample new PV driver for buffer sharing between domains
Date: Fri, 28 Sep 2018 15:42:52 +0200	[thread overview]
Message-ID: <d2b9cd5a-2768-60bd-07bd-2055d1490399@suse.com> (raw)
In-Reply-To: <CAC4nxbuTQ1uP6rKiCAp7hDe-ygq9LKHQw8ggVM+fOVH-VvU8Tw@mail.gmail.com>

On 28/09/2018 14:55, Omkar Bolla wrote:
> Hi,
> I tried to run script after pause the domain and unpause domain after
> run script. But I ended up with same error

I looked at the script again, it is wrong. The permissions should
be set for each node under the root path of the respective domains,
the first permission should be "n$domid" ($domid is the owner who
can always read/write, the n is "no access" for all domains not
explicitly listed), the second permission should be "r$domid" as
the other side should be able to read only.

In order to do it correctly the script should be:

#!/bin/bash

DOMU_ID=$1

if [ -z "$DOMU_ID"  ]; then
  echo "Usage: $0 [domU ID]]"
  echo
  echo "Connects the new device, with dom0 as backend, domU as frontend"
  exit 1
fi

# Pause domU as a script can't write an entry and set permission
# in a single operation.
xl pause $DOMU_ID

DEVICE=mydevice
DOMU_KEY=/local/domain/$DOMU_ID/device/$DEVICE/0
DOM0_KEY=/local/domain/0/backend/$DEVICE/$DOMU_ID/0

# Tell the domU about the new device and its backend
xenstore-write $DOMU_KEY/backend-id 0
xenstore-write $DOMU_KEY/backend
"/local/domain/0/backend/$DEVICE/$DOMU_ID/0"

# Tell the dom0 about the new device and its frontend
xenstore-write $DOM0_KEY/frontend-id $DOMU_ID
xenstore-write $DOM0_KEY/frontend "/local/domain/$DOMU_ID/device/$DEVICE/0"

# Activate the device, dom0 needs to be activated last
xenstore-write $DOMU_KEY/state 1
xenstore-write $DOM0_KEY/state 1

# Make sure the domU can read the dom0 data
xenstore-chmod -r $DOM0_KEY n0 r$DOMU_ID
xenstore-chmod -r $DOMU_KEY n$DOMU_ID r0

xl unpause $DOMU_ID


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-09-28 13:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27  5:44 Xen PV: Sample new PV driver for buffer sharing between domains Omkar Bolla
2018-09-27  9:39 ` Lars Kurth
2018-09-27 10:07   ` Oleksandr Andrushchenko
2018-09-27 10:16     ` Juergen Gross
2018-09-27 10:20       ` Oleksandr Andrushchenko
2018-09-27 10:34         ` Julien Grall
2018-09-27 10:35         ` Omkar Bolla
2018-09-27 11:03           ` Juergen Gross
2018-09-28 12:55             ` Omkar Bolla
2018-09-28 13:42               ` Juergen Gross [this message]
2018-10-02 10:03                 ` Omkar Bolla
2018-10-03  9:53                   ` Julien Grall
2018-10-08  9:12                     ` Omkar Bolla
2018-10-08 10:30                       ` Julien Grall
2018-10-17 12:24                         ` Omkar Bolla
2018-10-31 19:41                           ` Julien Grall
2018-11-01  9:15                             ` Omkar Bolla
2018-11-01 21:49                               ` Julien Grall
2018-11-02  5:25                                 ` Omkar Bolla
2018-11-02  8:47                                 ` Wei Liu

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=d2b9cd5a-2768-60bd-07bd-2055d1490399@suse.com \
    --to=jgross@suse.com \
    --cc=Oleksandr_Andrushchenko@epam.com \
    --cc=andr2000@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=lars.kurth.xen@gmail.com \
    --cc=omkar.bolla@pathpartnertech.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /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.