[Xen-devel] [PATCH v4 05/10] xen/arm: optee: add std call handling

2019-03-07 Thread Volodymyr Babchuk
From: Volodymyr Babchuk The main way to communicate with OP-TEE is to issue standard SMCCC call. "Standard" is a SMCCC term and it means that call can be interrupted and OP-TEE can return control to NW before completing the call. In contrast with fast calls, where arguments and return values are

Re: [Xen-devel] [PATCH v4 05/10] xen/arm: optee: add std call handling

2019-03-18 Thread Julien Grall
Hi Volodymyr, Only few NITs in this patch. See below: On 07/03/2019 21:04, Volodymyr Babchuk wrote: +/* + * Default maximal number concurrent threads that OP-TEE supports. + * This limits number of standard calls that guest can have. + */ +#define DEF_MAX_OPTEE_THREADS 16 + #define OPTEE_KNOW

Re: [Xen-devel] [PATCH v4 05/10] xen/arm: optee: add std call handling

2019-03-20 Thread Volodymyr Babchuk
Hi Julien, Julien Grall writes: [...] >> struct dt_device_node *node; >> @@ -48,12 +82,25 @@ static bool optee_probe(void) >>(uint32_t)resp.a3 != OPTEE_MSG_UID_3 ) >> return false; >> +/* Read number of threads */ >> +arm_smccc_smc(OPTEE_SMC_GET_CONFIG, OPTE

Re: [Xen-devel] [PATCH v4 05/10] xen/arm: optee: add std call handling

2019-03-20 Thread Julien Grall
On 20/03/2019 16:14, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, Julien Grall writes: [...] struct dt_device_node *node; @@ -48,12 +82,25 @@ static bool optee_probe(void) (uint32_t)resp.a3 != OPTEE_MSG_UID_3 ) return false; +/* Read number of th

Re: [Xen-devel] [PATCH v4 05/10] xen/arm: optee: add std call handling

2019-03-20 Thread Volodymyr Babchuk
Julien Grall writes: > On 20/03/2019 16:14, Volodymyr Babchuk wrote: >> >> Hi Julien, > > Hi Volodymyr, > >> Julien Grall writes: >> >> [...] struct dt_device_node *node; @@ -48,12 +82,25 @@ static bool optee_probe(void) (uint32_t)resp.a3 != OPTEE_MSG_UID_3 ) >>>

Re: [Xen-devel] [PATCH v4 05/10] xen/arm: optee: add std call handling

2019-03-20 Thread Julien Grall
Hi Volodymyr, On 20/03/2019 17:42, Volodymyr Babchuk wrote: [...] +static void put_std_call(struct optee_domain *ctx, struct optee_std_call *call) +{ +spin_lock(&ctx->lock); +ASSERT(call->in_flight); +unmap_xen_arg(call); Same question for the unmap. Yeah, in normal circumstance