Re: [Xen-devel] [PATCH v4 08/10] xen/arm: optee: add support for RPC commands

2019-03-20 Thread Volodymyr Babchuk
Julien Grall writes: [...] +/* + * TODO: With current implementation, OP-TEE will not issue + * RPC to free this buffer. Guest and OP-TEE will be out of + * sync: guest believes that it provided buffer to OP-TEE, + * while OP-TEE t

Re: [Xen-devel] [PATCH v4 08/10] xen/arm: optee: add support for RPC commands

2019-03-20 Thread Julien Grall
On 20/03/2019 15:36, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, Julien Grall writes: if ( shm_rpc->guest_page ) put_page(shm_rpc->guest_page); + Spurious change. Good catch. Thank you. +/* + * TODO: With current implementation, OP-TEE will

Re: [Xen-devel] [PATCH v4 08/10] xen/arm: optee: add support for RPC commands

2019-03-20 Thread Volodymyr Babchuk
Hi Julien, Julien Grall writes: >> if ( shm_rpc->guest_page ) >> put_page(shm_rpc->guest_page); >> + > > Spurious change. Good catch. Thank you. > >> +/* >> + * TODO: With current implementation, OP-TEE will not issue >> + * RPC to free this buffer. Gues

Re: [Xen-devel] [PATCH v4 08/10] xen/arm: optee: add support for RPC commands

2019-03-18 Thread Julien Grall
Hi Volodymyr, On 07/03/2019 21:04, Volodymyr Babchuk wrote: @@ -376,8 +391,11 @@ static struct shm_rpc *allocate_and_pin_shm_rpc(struct optee_domain *ctx, return shm_rpc; err: +free_domheap_page(shm_rpc->xen_arg_pg); + if ( shm_rpc->guest_page ) put_page(shm_rpc-

[Xen-devel] [PATCH v4 08/10] xen/arm: optee: add support for RPC commands

2019-03-07 Thread Volodymyr Babchuk
From: Volodymyr Babchuk OP-TEE can issue multiple RPC requests. We are interested mostly in request that asks NW to allocate/free shared memory for OP-TEE needs, because mediator needs to do address translation in the same way as it was done for shared buffers registered by NW. OP-TEE can ask NW