From: Andrii Anisov <andrii.anisov@gmail.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Oleks Tysh <olekstysh@gmail.com>,
embedded-pv-devel@lists.xenproject.org,
xen-devel@lists.xensource.com,
Artem Mygaiev <joculator@gmail.com>
Subject: Re: [RFC] Shared coprocessor framework
Date: Mon, 31 Oct 2016 21:31:04 +0200 [thread overview]
Message-ID: <CAC1Wxdgv-pF5aFa90ra+-GSr0SePsRG+LuAkUmrbFx69PHARUw@mail.gmail.com> (raw)
In-Reply-To: <8ffc5fdf-70b0-a1b6-1405-e9021a61df47@citrix.com>
> Thankyou for the design doc. An immediate +1 from me, simply for the
> doc existing :)
Thank you for you interest and comments.
> Forgive my ignorance (I am an x86 person, and given the CC list, I guess
> this is talking about ARM systems), but what are coprocessors and what
> might I do with one?
Well coprocessor could be a some processing unit inside a SoC which is
running some firmware and supplementing primary processor functions.
F.e. GPU, DSP, some FPGA inside a SoC.
The living example is a GPU sharing implemented for the ARM based SoC.
BTW, the xengt implements pretty close approach and is a pure x86
world solution.
> > It is targeted capability of different domains to run concurrently different
> > firmware on the coproc.
> I cant parse this sentence. I presume you mean that the purpose of this
> framework is to provide a mechanism for Xen to share a coprocessors
> resource between multiple domains?
Maybe it should be reworded. I mean that coprocessors are entities
which are running some firmware to perform their tasks. So different
domains in their time slice could run different versions of firmware
on the same coprocessor.
It is mentioned here to stress that domains contexts are totally
independent (both for processed data and for firmware code).
> Grammar nit. Either "Provide coprocessor resource sharing between..."
> or "Provide sharing of coprocessor resources between..."
Will take "Provide sharing of coprocessor resources between...".
> Does it need to only be configurable at system startup? There is often
> more flexibility by having a default configuration at system start (so
> dom0 can use the resources), which can later be altered by toolstack policy.
I did mean that hypervisor, what starts first, checks what
coprocessors within the system would be shared, own them and provide
to a framework. Providing some of those resources to dom0 would not a
big deal: just assign a vcoproc to the domain. And yes, it could be a
default configuration.
>
> Considering the latter option, even if you don't implement support at
> first, tends to lead to a cleaner design, but of course it does depend
> heavily on the details of the situation.
Definitely we would tailor the design along with an implementation.
> > * MMU-enabled SoC with MMU-protected coprocessor(s)
> Right - definitely ARM then, but it took me until half way through the
> document to work this out.
You know, it was specified ARM based SoC here. At some point it was
removed such a dependency. Inspired by the already mentioned xengt.
> I would be tempted to extend this slightly, and specify that there
> should be a mechanism for the toolstack to query all of this information
> at arbitrary points in time.
It should be covered here:
>
> > Runtime configuration of scheduling algorithm per instance of shared
> > --------------------------------------------------------------------
> > coprocessor
> > -----------
> >
> > There will be a initial domain tool implemented which will provide a CLI for
> > runtime monitoring of shared coprocessors instances available, per-domain/
> > per-coproc instance list of vcoproc and runtime setup of the scheduler per
> > each coprocessor instance.
Maybe it needs some rewording.
> Do you mean that, ideally, Xen can fully context switch a coprocessor
> behind the back of domU, and the domU driver need not know or care about
> the difference?
You've got the point.
> And, where that isn't possible, some virtual hooks could be introduced
> to the domU driver so domU can opt into sharing when it has a compatible
> driver?
Yes, due to specifics of SoC implementation pure solution could be
inefficient, not secure or even impossible. In this case
drivers/firmware could be modified to cooperate with coprocessor
sharing framework in XEN.
This part could be architecture (coprocessor) specific, or machine
(SoC) specific.
Sincerely,
Andrii Anisov.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-10-31 19:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 17:53 [RFC] Shared coprocessor framework Andrii Anisov
2016-10-28 18:38 ` Andrew Cooper
2016-10-31 19:31 ` Andrii Anisov [this message]
2016-11-01 13:57 ` Artem Mygaiev
2016-11-03 11:31 ` Andrii Anisov
2016-11-11 20:43 ` Konrad Rzeszutek Wilk
2016-11-12 12:04 ` Artem Mygaiev
2016-11-15 19:23 ` Konrad Rzeszutek Wilk
2016-11-16 13:42 ` Andrii Anisov
2016-11-16 12:39 ` Andrii Anisov
2016-11-22 1:50 ` Stefano Stabellini
2016-11-23 13:54 ` Andrii Anisov
2016-11-23 18:56 ` Stefano Stabellini
2016-11-23 19:07 ` Andrii Anisov
2016-11-23 19:23 ` 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=CAC1Wxdgv-pF5aFa90ra+-GSr0SePsRG+LuAkUmrbFx69PHARUw@mail.gmail.com \
--to=andrii.anisov@gmail.com \
--cc=andrew.cooper3@citrix.com \
--cc=embedded-pv-devel@lists.xenproject.org \
--cc=joculator@gmail.com \
--cc=olekstysh@gmail.com \
--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 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).