Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-07 Thread Stuart Yoder
On 12/6/17 4:31 PM, Julien Grall wrote: Hi Stuart, On 12/05/2017 03:36 PM, Stuart Yoder wrote: There are limit on pCPUs, though. But this is not a problem, because XEN scheduler will decide which guest will access OP-TEE right now. OP-TEE don't have own scheduler at all, by the way. It is s

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-06 Thread Julien Grall
Hi, Answering to myself. On 12/04/2017 02:30 PM, Julien Grall wrote: On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: = Xen command forwarding = In the code below, it looks like Xen is forwarding everything to OP-TEE. Are there some commands Xen shoul

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-06 Thread Julien Grall
Hi Stuart, On 12/05/2017 03:36 PM, Stuart Yoder wrote: There are limit on pCPUs, though. But this is not a problem, because XEN scheduler will decide which guest will access OP-TEE right now. OP-TEE don't have own scheduler at all, by the way. It is scheduled by normal world. Do you mind to

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-05 Thread Stuart Yoder
There are limit on pCPUs, though. But this is not a problem, because XEN scheduler will decide which guest will access OP-TEE right now. OP-TEE don't have own scheduler at all, by the way. It is scheduled by normal world. Do you mind to give a bit more explanation here? Do you plan to add know

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-05 Thread Volodymyr Babchuk
Hi Stefano, On 05.12.17 00:06, Stefano Stabellini wrote: On Mon, 4 Dec 2017, Volodymyr Babchuk wrote: = Xen command forwarding = In the code below, it looks like Xen is forwarding everything to OP-TEE. Are there some commands Xen should avoid forwarding? Should we have a whitelist or a blackl

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-05 Thread Julien Grall
Hi, On 04/12/17 22:04, Stefano Stabellini wrote: On Mon, 4 Dec 2017, Volodymyr Babchuk wrote: Hi Julien, On Mon, Dec 04, 2017 at 04:27:14PM +, Julien Grall wrote: [...] = Error checking / DOS protection = We need powerful checks on arguments passed by the caller and evaluated by the me

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Stefano Stabellini
On Mon, 4 Dec 2017, Volodymyr Babchuk wrote: > > = Xen command forwarding = > > > > In the code below, it looks like Xen is forwarding everything to OP-TEE. > > Are there some commands Xen should avoid forwarding? Should we have a > > whitelist or a blacklist? > My code implements whitelists (at l

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Stefano Stabellini
On Mon, 4 Dec 2017, Volodymyr Babchuk wrote: > Hi Julien, > > > On Mon, Dec 04, 2017 at 04:27:14PM +, Julien Grall wrote: > > [...] > > >>= Error checking / DOS protection = > > >> > > >>We need powerful checks on arguments passed by the caller and evaluated > > >>by the mediator. > > >> > >

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Volodymyr Babchuk
Hi Julien, On Mon, Dec 04, 2017 at 04:27:14PM +, Julien Grall wrote: [...] > >>= Error checking / DOS protection = > >> > >>We need powerful checks on arguments passed by the caller and evaluated > >>by the mediator. > >> > >>For example, we cannot expect the guest to actually pass arguments

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
On 04/12/17 16:24, Volodymyr Babchuk wrote: On Mon, Dec 04, 2017 at 02:30:32PM +, Julien Grall wrote: On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: = Page pinning = Guest pages passed to OP-TEE need to be pinned (otherwise Xen doesn't guarante

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
On 04/12/17 16:15, Volodymyr Babchuk wrote: Hi Stefano, On Fri, Dec 01, 2017 at 02:58:57PM -0800, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: This is follow-up to our conversation during community call. You asked me to send OP-TEE mediator as a patch, so we can di

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Volodymyr Babchuk
Hi Julien, On Mon, Dec 04, 2017 at 02:30:32PM +, Julien Grall wrote: > Hi, > > I am going to answer both e-mails (Stefano and Volodymyr) at once. > > On 01/12/17 22:58, Stefano Stabellini wrote: > >On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: > >>This is follow-up to our conversation during

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Volodymyr Babchuk
Hi Stefano, On Fri, Dec 01, 2017 at 02:58:57PM -0800, Stefano Stabellini wrote: > On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: > > This is follow-up to our conversation during community call. > > You asked me to send OP-TEE mediator as a patch, so we can > > discuss it in the mailing list. So, th

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Andrew Cooper
On 01/12/17 22:58, Stefano Stabellini wrote: > > = Xen command forwarding = > > In the code below, it looks like Xen is forwarding everything to OP-TEE. > Are there some commands Xen should avoid forwarding? Should we have a > whitelist or a blacklist? Whitelist everything. At the very minimum, i

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
Hi, I am going to answer both e-mails (Stefano and Volodymyr) at once. On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: This is follow-up to our conversation during community call. You asked me to send OP-TEE mediator as a patch, so we can discuss it i

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-01 Thread Stefano Stabellini
On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: > This is follow-up to our conversation during community call. > You asked me to send OP-TEE mediator as a patch, so we can > discuss it in the mailing list. So, there it is. I squashed > two patches into one and skipped patches that we already > discus

[Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-11-27 Thread Volodymyr Babchuk
This is follow-up to our conversation during community call. You asked me to send OP-TEE mediator as a patch, so we can discuss it in the mailing list. So, there it is. I squashed two patches into one and skipped patches that we already discussed. So, this is basically all what is needed to suppor