xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii_anisov@epam.com>
To: Julien Grall <julien.grall@arm.com>,
	Andrii Anisov <andrii.anisov@gmail.com>,
	xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [RFC] scf: SCF device tree and configuration documentation
Date: Thu, 4 May 2017 18:50:22 +0300	[thread overview]
Message-ID: <8a92d2a1-d6ee-45e3-7c60-f828d8ac4fb2@epam.com> (raw)
In-Reply-To: <b8a38234-59ec-bac4-8ad4-b8e751ec16c5@arm.com>

Julien,

>
> What I would like to understand is what are the information that the 
> hypervisors as to know for sharing co-processor? So far I have:
>     - MMIOs
>     - Interrupts
>
> Anything else?
IOMMU bindings.
This knowledge enough to get the physical coprocessor shared.

In order to spawn a virtual coprocessor (vcoproc) for some domain you 
have to provide additional configuration information:
     - Which physical coprocessor this vcoproc should represent to a 
domain ( a SoC could have several physical coprocs shared through the 
framework)
     - IRQ(s) (provided that no IRQ remapping is implemented in XEN) 
could be omitted (or used for verification only)
     - IOMEM ranges correspondence between this vcoproc instance and a 
physical coprocessor.

The latest point in the configuration is the most complex.
Let me explain a use case we faced now:
     - a GPU has two different firmwares implementing OpenGL and OpenCL
     - we need both GL and CL in the same domain working simultaneously 
(actually concurrently, but the concurrency should be transparent for 
domain, GPU drivers and firmwares)
In current case we are lucky, the GPU has a single mmio range.
We can implement such system using SCF: spawn two vcoprocs for a domain. 
Those vcoprocs will have own mmio range within the domain.
In a hypervisor those mmio ranges would be served by the same handler, 
but must be associated with the own vcoproc context.

In case a coprocessor has several mmio ranges things are getting worse.

In a device tree configuration concept I explicitly link vcoproc to 
pcoproc and keep mmio ranges correspondency with names.
I'm not sure how to keep this coincidence in a simple way.

-- 

*Andrii Anisov*



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

  reply	other threads:[~2017-05-04 15:50 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 [this message]
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
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=8a92d2a1-d6ee-45e3-7c60-f828d8ac4fb2@epam.com \
    --to=andrii_anisov@epam.com \
    --cc=andrii.anisov@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).