diff mbox series

[XEN,v8,21/22] xen/arm: ffa: list current limitations

Message ID 20230413071424.3273490-22-jens.wiklander@linaro.org (mailing list archive)
State New, archived
Headers show
Series Xen FF-A mediator | expand

Commit Message

Jens Wiklander April 13, 2023, 7:14 a.m. UTC
Adds a comments with a list of unsupported FF-A interfaces and
limitations in the implemented FF-A interfaces.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 xen/arch/arm/tee/ffa.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Henry Wang April 13, 2023, 11:24 a.m. UTC | #1
Hi Jens,

> -----Original Message-----
> Subject: [XEN PATCH v8 21/22] xen/arm: ffa: list current limitations
> 
> Adds a comments with a list of unsupported FF-A interfaces and

Typo: s/a comments/comments/

> limitations in the implemented FF-A interfaces.
> 
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> ---
>  xen/arch/arm/tee/ffa.c | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
> index 0948cc636871..6424c222c885 100644
> --- a/xen/arch/arm/tee/ffa.c
> +++ b/xen/arch/arm/tee/ffa.c
> @@ -13,6 +13,38 @@
>   *                https://developer.arm.com/documentation/den0077/e
>   * TEEC-1.0C: TEE Client API Specification version 1.0c available at
>   *            https://globalplatform.org/specs-library/tee-client-api-specification/
> + *
> + * Notes on the the current implementstion.

Typo: s/implementstion/implementation/

> + *
> + * Unsupported FF-A interfaces:
> + * o FFA_MSG_POLL and FFA_MSG_SEND - deprecated in FF-A-1.1-REL0
> + * o FFA_MEM_RETRIEVE_* - Used when sharing memory from an SP to a
> VM
> + * o FFA_MEM_DONATE_* and FFA_MEM_LEND_* - Used when tranferring
> ownership
> + *   or access of a memory readion

Typo "readion"? Maybe I am wrong but I cannot find this word in the spec.

With above typos corrected:

Reviewed-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry
Jens Wiklander April 13, 2023, 2:01 p.m. UTC | #2
Hi Henry,

On Thu, Apr 13, 2023 at 1:24 PM Henry Wang <Henry.Wang@arm.com> wrote:
>
> Hi Jens,
>
> > -----Original Message-----
> > Subject: [XEN PATCH v8 21/22] xen/arm: ffa: list current limitations
> >
> > Adds a comments with a list of unsupported FF-A interfaces and
>
> Typo: s/a comments/comments/

OK

>
> > limitations in the implemented FF-A interfaces.
> >
> > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> > ---
> >  xen/arch/arm/tee/ffa.c | 32 ++++++++++++++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >
> > diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
> > index 0948cc636871..6424c222c885 100644
> > --- a/xen/arch/arm/tee/ffa.c
> > +++ b/xen/arch/arm/tee/ffa.c
> > @@ -13,6 +13,38 @@
> >   *                https://developer.arm.com/documentation/den0077/e
> >   * TEEC-1.0C: TEE Client API Specification version 1.0c available at
> >   *            https://globalplatform.org/specs-library/tee-client-api-specification/
> > + *
> > + * Notes on the the current implementstion.
>
> Typo: s/implementstion/implementation/

OK

>
> > + *
> > + * Unsupported FF-A interfaces:
> > + * o FFA_MSG_POLL and FFA_MSG_SEND - deprecated in FF-A-1.1-REL0
> > + * o FFA_MEM_RETRIEVE_* - Used when sharing memory from an SP to a
> > VM
> > + * o FFA_MEM_DONATE_* and FFA_MEM_LEND_* - Used when tranferring
> > ownership
> > + *   or access of a memory readion
>
> Typo "readion"? Maybe I am wrong but I cannot find this word in the spec.

I'll fix it.

>
> With above typos corrected:
>
> Reviewed-by: Henry Wang <Henry.Wang@arm.com>

Thanks,
Jens

>
> Kind regards,
> Henry
Julien Grall April 13, 2023, 8:57 p.m. UTC | #3
Hi Jens,

On 13/04/2023 08:14, Jens Wiklander wrote:
> Adds a comments with a list of unsupported FF-A interfaces and
> limitations in the implemented FF-A interfaces.
> 
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> ---
>   xen/arch/arm/tee/ffa.c | 32 ++++++++++++++++++++++++++++++++
>   1 file changed, 32 insertions(+)
> 
> diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
> index 0948cc636871..6424c222c885 100644
> --- a/xen/arch/arm/tee/ffa.c
> +++ b/xen/arch/arm/tee/ffa.c
> @@ -13,6 +13,38 @@
>    *                https://developer.arm.com/documentation/den0077/e
>    * TEEC-1.0C: TEE Client API Specification version 1.0c available at
>    *            https://globalplatform.org/specs-library/tee-client-api-specification/
> + *
> + * Notes on the the current implementstion.
> + *
> + * Unsupported FF-A interfaces:
> + * o FFA_MSG_POLL and FFA_MSG_SEND - deprecated in FF-A-1.1-REL0
> + * o FFA_MEM_RETRIEVE_* - Used when sharing memory from an SP to a VM
> + * o FFA_MEM_DONATE_* and FFA_MEM_LEND_* - Used when tranferring ownership
> + *   or access of a memory readion
> + * o FFA_MSG_SEND2 and FFA_MSG_WAIT - Used for indirect messaging
> + * o FFA_MSG_YIELD
> + * o FFA_INTERRUPT - Used to report preemption
> + * o FFA_RUN
> + *
> + * Limitations in the implemented FF-A interfaces:
> + * o FFA_RXTX_MAP_*:
> + *   - Maps at most 32 4k pages large RX and TX buffers
> + *   - RT/TX buffers must be normal RAM

Can you explain why this is a problem?

> + *   - Doesn't support forwarding this call on behalf of an endpoint
> + * o FFA_MEM_SHARE_*: only supports sharing
> + *   - from a VM to an SP
> + *   - with one borrower
> + *   - with the memory transaction descriptor in the RX/TX buffer
> + *   - normal memory
> + *   - at most 512 kB large memory regions
> + *   - at most 32 shared memory regions per guest
> + * o FFA_MSG_SEND_DIRECT_REQ:
> + *   - only supported from a VM to an SP
> + *
> + * There are some large locked sections with ffa_tx_buffer_lock and
> + * ffa_rx_buffer_lock. Especially the ffa_tx_buffer_lock spinlock used
> + * around share_shm() is a very large locked section which can let one VM
> + * affect another VM.
>    */
>   
>   #include <xen/bitops.h>

Cheers,
Jens Wiklander April 14, 2023, 12:54 p.m. UTC | #4
Hi Julien,

On Thu, Apr 13, 2023 at 10:57 PM Julien Grall <julien@xen.org> wrote:
>
> Hi Jens,
>
> On 13/04/2023 08:14, Jens Wiklander wrote:
> > Adds a comments with a list of unsupported FF-A interfaces and
> > limitations in the implemented FF-A interfaces.
> >
> > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> > ---
> >   xen/arch/arm/tee/ffa.c | 32 ++++++++++++++++++++++++++++++++
> >   1 file changed, 32 insertions(+)
> >
> > diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
> > index 0948cc636871..6424c222c885 100644
> > --- a/xen/arch/arm/tee/ffa.c
> > +++ b/xen/arch/arm/tee/ffa.c
> > @@ -13,6 +13,38 @@
> >    *                https://developer.arm.com/documentation/den0077/e
> >    * TEEC-1.0C: TEE Client API Specification version 1.0c available at
> >    *            https://globalplatform.org/specs-library/tee-client-api-specification/
> > + *
> > + * Notes on the the current implementstion.
> > + *
> > + * Unsupported FF-A interfaces:
> > + * o FFA_MSG_POLL and FFA_MSG_SEND - deprecated in FF-A-1.1-REL0
> > + * o FFA_MEM_RETRIEVE_* - Used when sharing memory from an SP to a VM
> > + * o FFA_MEM_DONATE_* and FFA_MEM_LEND_* - Used when tranferring ownership
> > + *   or access of a memory readion
> > + * o FFA_MSG_SEND2 and FFA_MSG_WAIT - Used for indirect messaging
> > + * o FFA_MSG_YIELD
> > + * o FFA_INTERRUPT - Used to report preemption
> > + * o FFA_RUN
> > + *
> > + * Limitations in the implemented FF-A interfaces:
> > + * o FFA_RXTX_MAP_*:
> > + *   - Maps at most 32 4k pages large RX and TX buffers
> > + *   - RT/TX buffers must be normal RAM
>
> Can you explain why this is a problem?

Good catch, I can't. I must have added it by mistake. I'll remove it.

Thanks,
Jens

>
> > + *   - Doesn't support forwarding this call on behalf of an endpoint
> > + * o FFA_MEM_SHARE_*: only supports sharing
> > + *   - from a VM to an SP
> > + *   - with one borrower
> > + *   - with the memory transaction descriptor in the RX/TX buffer
> > + *   - normal memory
> > + *   - at most 512 kB large memory regions
> > + *   - at most 32 shared memory regions per guest
> > + * o FFA_MSG_SEND_DIRECT_REQ:
> > + *   - only supported from a VM to an SP
> > + *
> > + * There are some large locked sections with ffa_tx_buffer_lock and
> > + * ffa_rx_buffer_lock. Especially the ffa_tx_buffer_lock spinlock used
> > + * around share_shm() is a very large locked section which can let one VM
> > + * affect another VM.
> >    */
> >
> >   #include <xen/bitops.h>
>
> Cheers,
>
> --
> Julien Grall
diff mbox series

Patch

diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
index 0948cc636871..6424c222c885 100644
--- a/xen/arch/arm/tee/ffa.c
+++ b/xen/arch/arm/tee/ffa.c
@@ -13,6 +13,38 @@ 
  *                https://developer.arm.com/documentation/den0077/e
  * TEEC-1.0C: TEE Client API Specification version 1.0c available at
  *            https://globalplatform.org/specs-library/tee-client-api-specification/
+ *
+ * Notes on the the current implementstion.
+ *
+ * Unsupported FF-A interfaces:
+ * o FFA_MSG_POLL and FFA_MSG_SEND - deprecated in FF-A-1.1-REL0
+ * o FFA_MEM_RETRIEVE_* - Used when sharing memory from an SP to a VM
+ * o FFA_MEM_DONATE_* and FFA_MEM_LEND_* - Used when tranferring ownership
+ *   or access of a memory readion
+ * o FFA_MSG_SEND2 and FFA_MSG_WAIT - Used for indirect messaging
+ * o FFA_MSG_YIELD
+ * o FFA_INTERRUPT - Used to report preemption
+ * o FFA_RUN
+ *
+ * Limitations in the implemented FF-A interfaces:
+ * o FFA_RXTX_MAP_*:
+ *   - Maps at most 32 4k pages large RX and TX buffers
+ *   - RT/TX buffers must be normal RAM
+ *   - Doesn't support forwarding this call on behalf of an endpoint
+ * o FFA_MEM_SHARE_*: only supports sharing
+ *   - from a VM to an SP
+ *   - with one borrower
+ *   - with the memory transaction descriptor in the RX/TX buffer
+ *   - normal memory
+ *   - at most 512 kB large memory regions
+ *   - at most 32 shared memory regions per guest
+ * o FFA_MSG_SEND_DIRECT_REQ:
+ *   - only supported from a VM to an SP
+ *
+ * There are some large locked sections with ffa_tx_buffer_lock and
+ * ffa_rx_buffer_lock. Especially the ffa_tx_buffer_lock spinlock used
+ * around share_shm() is a very large locked section which can let one VM
+ * affect another VM.
  */
 
 #include <xen/bitops.h>