All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii_anisov@epam.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Andrii Anisov <andrii.anisov@gmail.com>
Subject: Re: [RFC] scf: SCF device tree and configuration documentation
Date: Wed, 10 May 2017 19:26:13 +0300	[thread overview]
Message-ID: <6824513d-c27d-3a0d-e55d-2cd442fcb0c4@epam.com> (raw)
In-Reply-To: <22803.8726.231791.473061@mariner.uk.xensource.com>


On 10.05.17 17:22, Ian Jackson wrote:
> The IO access emulation just directs the access to somewhere where it
> can be emulated.  Does that mean you intend for there to be a software
> emulation of the vcoproc, as well as hardware passthrough (with
> context switching) ?

The concept of an "access emulation" is not about emulating a coproc 
functionality, its only about reacting on mmio accesses appropriately 
from the user (domain) point of view.
Basically on a register read - return shadowed value; on writes - stack 
them, to replay them to the HW once this vcoproc context is scheduled in.
I do realize that this part could be the most complex part of some 
specific coprocessor SCF support code.


>
> Obviously I am still confused, because this doesn't seem to make sense
> to me.  I was imagining the toolstack generating virtual irqs/mmio
> ranges which the guest would see.  It would then arrange for Xen to
> program the hardware appropriately, to direct those ranges to the
> physical hardware (when the coproc is exposed to the guest).
While you are virtualizing a coprocessor, you can not map those address 
ranges for the domain permanently. At least during the period a vcoproc 
is scheduled out, ranges should be unmapped and accesses should be 
handled by access emulation mmio handlers.

> And I don't see why the physical address ranges used by Xen to
> manipulate the coproc would have to be the same as the guest
> pseudophysical addresses used by the guest.
No need to keep ranges the same. But for proper access emulation 
functionality you have to identify specific address ranges in order to 
assign appropriate mmio handlers.

> As for device tree generation, any kind of passthrough of a DT device
> is going to involve filtering/processing/amending the DT information
> for the device: something is going to have to take the information
> from the physical DT (as provided to Xen), find the relevant parts
> (the parts which relate to the particular device), and substitute
> addresses etc., and insert the result into the guest DT.

Something like this is done now, except taking the info from the physical DT. Now it is assumed that the pfdt OK, if the SCF is able to be configured with this pfdt. Not brilliant, but works for me this far.

> So this will be done by something in the domain configuration ?
Yes, sure. I think the domain configuration file should have the needed 
config options.
But so far I did not realize the appropriate config format, so I keep 
the configuration in a device tree both for Dom0 and DomU.
For DomU the partial device tree option only is used so far. Toolstack 
does parse the pfdt, in case nodes with "xen,vcoproc" are
found, actions to configure SCF are taken.



-- 

*Andrii Anisov*



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

  reply	other threads:[~2017-05-10 16:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04  9:32 [RFC] scf: SCF device tree and configuration documentation Andrii Anisov
2017-05-04 10:03 ` Andrii Anisov
2017-05-04 10:41   ` Julien Grall
2017-05-04 12:35     ` Andrii Anisov
2017-05-04 12:46       ` Julien Grall
2017-05-04 15:50         ` Andrii Anisov
2017-05-05 13:49           ` Julien Grall
2017-05-05 14:13             ` Ian Jackson
2017-05-05 17:07               ` Andrii Anisov
2017-05-05 17:20                 ` Ian Jackson
2017-05-10  9:16                   ` Andrii Anisov
2017-05-10 14:22                     ` Ian Jackson
2017-05-10 16:26                       ` Andrii Anisov [this message]
2017-05-04 16:13         ` Andrii Anisov
2017-05-05 14:12           ` Julien Grall
2017-05-05 15:27             ` Andrii Anisov
2017-05-05 17:51               ` Julien Grall
2017-05-10 15:30                 ` Andrii Anisov
2017-05-10 17:40                   ` Julien Grall
2017-05-10 17:47                     ` Andrii Anisov

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=6824513d-c27d-3a0d-e55d-2cd442fcb0c4@epam.com \
    --to=andrii_anisov@epam.com \
    --cc=andrii.anisov@gmail.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.