From: Julien Grall <julien.grall@arm.com>
To: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "tee-dev@lists.linaro.org" <tee-dev@lists.linaro.org>,
Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH v5 05/10] xen/arm: optee: add std call handling
Date: Mon, 3 Jun 2019 13:34:11 +0100 [thread overview]
Message-ID: <5b6b6565-b189-a681-f004-3b94c9cbd064@arm.com> (raw)
In-Reply-To: <20190521212530.12706-6-volodymyr_babchuk@epam.com>
Hi Volodymyr,
On 21/05/2019 22:26, Volodymyr Babchuk wrote:
> 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 passed in registers, standard calls use shared memory. Register
> pair a1,a2 holds 64-bit PA of command buffer, where all arguments
> are stored and which is used to return data. OP-TEE internally
> copies contents of this buffer into own secure memory before accessing
> and validating any data in command buffer. This is done to make sure
> that NW will not change contents of the validated parameters.
>
> Mediator needs to do the same for number of reasons:
>
> 1. To make sure that guest will not change data after validation.
> 2. To translate IPAs to PAs in the command buffer (this is not done
> in this patch).
> 3. To hide translated address from guest, so it will not be able
> to do IPA->PA translation by misusing mediator.
>
> During standard call OP-TEE can issue multiple "RPC returns", asking
> NW to do some work for OP-TEE. NW then issues special call
> OPTEE_SMC_CALL_RETURN_FROM_RPC to resume handling of the original call.
> Thus, mediator needs to maintain context for original standard call
> during multiple SMCCC calls.
>
> Standard call is considered complete, when returned value is
> not a RPC request.
>
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@arm.com>
To: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "tee-dev@lists.linaro.org" <tee-dev@lists.linaro.org>,
Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [Xen-devel] [PATCH v5 05/10] xen/arm: optee: add std call handling
Date: Mon, 3 Jun 2019 13:34:11 +0100 [thread overview]
Message-ID: <5b6b6565-b189-a681-f004-3b94c9cbd064@arm.com> (raw)
Message-ID: <20190603123411.yquj6yCCfC5lFvQhkt-ZF2ZPBpwTw3EGApz6qsuXD0E@z> (raw)
In-Reply-To: <20190521212530.12706-6-volodymyr_babchuk@epam.com>
Hi Volodymyr,
On 21/05/2019 22:26, Volodymyr Babchuk wrote:
> 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 passed in registers, standard calls use shared memory. Register
> pair a1,a2 holds 64-bit PA of command buffer, where all arguments
> are stored and which is used to return data. OP-TEE internally
> copies contents of this buffer into own secure memory before accessing
> and validating any data in command buffer. This is done to make sure
> that NW will not change contents of the validated parameters.
>
> Mediator needs to do the same for number of reasons:
>
> 1. To make sure that guest will not change data after validation.
> 2. To translate IPAs to PAs in the command buffer (this is not done
> in this patch).
> 3. To hide translated address from guest, so it will not be able
> to do IPA->PA translation by misusing mediator.
>
> During standard call OP-TEE can issue multiple "RPC returns", asking
> NW to do some work for OP-TEE. NW then issues special call
> OPTEE_SMC_CALL_RETURN_FROM_RPC to resume handling of the original call.
> Thus, mediator needs to maintain context for original standard call
> during multiple SMCCC calls.
>
> Standard call is considered complete, when returned value is
> not a RPC request.
>
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-06-03 12:34 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 21:25 [PATCH v5 00/10] TEE mediator (and OP-TEE) support in XEN Volodymyr Babchuk
2019-05-21 21:25 ` [Xen-devel] " Volodymyr Babchuk
2019-05-21 21:25 ` [PATCH v5 01/10] xen/arm: add generic TEE mediator framework Volodymyr Babchuk
2019-05-21 21:25 ` [Xen-devel] " Volodymyr Babchuk
2019-05-22 8:45 ` Jan Beulich
2019-05-22 8:45 ` [Xen-devel] " Jan Beulich
2019-05-22 9:27 ` Julien Grall
2019-05-22 9:27 ` [Xen-devel] " Julien Grall
2019-05-22 10:02 ` Jan Beulich
2019-05-22 10:02 ` [Xen-devel] " Jan Beulich
2019-05-22 12:04 ` Julien Grall
2019-05-22 12:04 ` [Xen-devel] " Julien Grall
2019-06-03 11:46 ` Julien Grall
2019-06-03 11:46 ` [Xen-devel] " Julien Grall
2019-06-03 11:48 ` Julien Grall
2019-06-03 11:48 ` [Xen-devel] " Julien Grall
2019-06-06 16:02 ` Julien Grall
2019-06-07 9:36 ` Julien Grall
2019-06-11 18:18 ` Volodymyr Babchuk
2019-06-11 18:26 ` Julien Grall
2019-05-21 21:25 ` [PATCH v5 02/10] xen/arm: optee: add OP-TEE header files Volodymyr Babchuk
2019-05-21 21:25 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 11:49 ` Julien Grall
2019-06-03 11:49 ` [Xen-devel] " Julien Grall
2019-06-10 18:20 ` Volodymyr Babchuk
2019-06-10 18:53 ` Julien Grall
2019-05-21 21:25 ` [PATCH v5 03/10] xen/arm: optee: add OP-TEE mediator skeleton Volodymyr Babchuk
2019-05-21 21:25 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 12:34 ` Julien Grall
2019-06-03 12:34 ` [Xen-devel] " Julien Grall
2019-05-21 21:25 ` [PATCH v5 04/10] xen/arm: optee: add fast calls handling Volodymyr Babchuk
2019-05-21 21:25 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 12:34 ` Julien Grall
2019-06-03 12:34 ` [Xen-devel] " Julien Grall
2019-05-21 21:26 ` [PATCH v5 05/10] xen/arm: optee: add std call handling Volodymyr Babchuk
2019-05-21 21:26 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 12:34 ` Julien Grall [this message]
2019-06-03 12:34 ` Julien Grall
2019-05-21 21:26 ` [PATCH v5 06/10] xen/arm: optee: add support for RPC SHM buffers Volodymyr Babchuk
2019-05-21 21:26 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 12:33 ` Julien Grall
2019-06-03 12:33 ` [Xen-devel] " Julien Grall
2019-05-21 21:26 ` [PATCH v5 07/10] xen/arm: optee: add support for arbitrary shared memory Volodymyr Babchuk
2019-05-21 21:26 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 12:29 ` Julien Grall
2019-06-03 12:29 ` [Xen-devel] " Julien Grall
2019-05-21 21:26 ` [PATCH v5 08/10] xen/arm: optee: add support for RPC commands Volodymyr Babchuk
2019-05-21 21:26 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 12:33 ` Julien Grall
2019-06-03 12:33 ` [Xen-devel] " Julien Grall
2019-05-21 21:26 ` [PATCH v5 09/10] tools/arm: tee: add "tee" option for xl.cfg Volodymyr Babchuk
2019-05-21 21:26 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 12:44 ` Julien Grall
2019-06-03 12:44 ` [Xen-devel] " Julien Grall
2019-06-03 14:47 ` Ian Jackson
2019-06-03 14:47 ` [Xen-devel] " Ian Jackson
2019-05-21 21:26 ` [PATCH v5 10/10] tools/arm: optee: create optee firmware node in DT if tee=optee Volodymyr Babchuk
2019-05-21 21:26 ` [Xen-devel] " Volodymyr Babchuk
2019-06-03 14:50 ` Ian Jackson
2019-06-03 14:50 ` [Xen-devel] " Ian Jackson
2019-06-01 14:50 ` [PATCH v5 00/10] TEE mediator (and OP-TEE) support in XEN Julien Grall
2019-06-01 14:50 ` [Xen-devel] " Julien Grall
2019-06-01 16:07 ` Volodymyr Babchuk
2019-06-01 16:07 ` [Xen-devel] " Volodymyr Babchuk
2019-06-01 16:55 ` Julien Grall
2019-06-01 16:55 ` [Xen-devel] " Julien Grall
2019-06-04 13:31 ` Volodymyr Babchuk
2019-06-06 15:33 ` Julien Grall
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=5b6b6565-b189-a681-f004-3b94c9cbd064@arm.com \
--to=julien.grall@arm.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=sstabellini@kernel.org \
--cc=tee-dev@lists.linaro.org \
--cc=xen-devel@lists.xenproject.org \
/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).