Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
To: Julien Grall <julien.grall@arm.com>
Cc: "tee-dev@lists.linaro.org" <tee-dev@lists.linaro.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [Xen-devel] [PATCH v6 09/10] tools/arm: tee: add "tee" option for xl.cfg
Date: Tue, 18 Jun 2019 14:30:45 +0000
Message-ID: <87tvcn6k4r.fsf@epam.com> (raw)
In-Reply-To: <ead7d399-92a2-9d7f-91e4-2d6cf4c9961b@arm.com>

Julien Grall writes:

> On 18/06/2019 12:19, Volodymyr Babchuk wrote:
>> Hi Julien,
> Hi,
>> Julien Grall writes:
>>>> +
>>>> +=item B<optee>
>>>> +
>>>> +Allow a guest to use OP-TEE. Note that a virtualization-aware OP-TEE
>>>> +is required for this. If this option is selected, guest will be able
>>> OOI, what happen if OP-TEE does not support virtualization. Will Xen
>>> forbid to use it?
>> Yes, Xen will get an error from OP-TEE during domain construction. This
>> will lead to domain creation failure.
> This is a bit odd. It means we have no way to know in advance whether
> OP-TEE will be able to create a client.
Yes. There can be at least two reasons for this:
1. OP-TEE is built without virtualization support at all
2. OP-TEE have no resources for a new guest

> In other word, when the
> mediator is built in Xen, all existing setup with OP-TEE (and
> no-virtualization) will fail.
Right. If user provides DTB with 'optee' node, but OP-TEE is build without
virtualization support, Dom0 will not be created. This can be fixed by
adding new capability flag into OP-TEE, that tells Xen about
virtualization support. For some reason I missed this when I implemented
VM support in OP-TEE :(

> My expectation is Xen should be able to know whether the mediator can be used.
I need to implement additional capability flag in the OP-TEE. This is
not so hard, but it will be available only in the next release. For now,
we can document this limitation somewhere.

>>>> +to access to the real OP-TEE OS running on the host. Guest creation
>>> s/real// it is redundant with the rest of the sentence. However, it
>>> does not really answer to the question regarding isolation.
>> Your assumption is correct - OP-TEE provides isolation on its side.
>>>> +will fail if OP-TEE have no resources for a new guest. Number of supported
>>>> +guests depends on OP-TEE configuration.
>>> How about the following description (correct me if my understanding is
>>> wrong):
>>> "Allow a guest to access the host OP-TEE OS. Xen will mediate the
>>> access to OP-TEE and the resource isolation will be provided directly
>>> by OP-TEE. OP-TEE itself may limit the number of guests that can
>>> concurrently use it. This requires a virtualization-aware OP-TEE for
>>> this to work.
>>> This feature is a B<technology preview>."
>> That's much better than my version. Thank you.
>>> How can a user know whether OP-TEE supports virtualization? Is it
>>> configurable at build?
>> Yes, there is a special configuration option CFG_VIRTUALIZATION. This is
>> covered in OP-TEE documentation at [1]
>> [1] https://optee.readthedocs.io/architecture/virtualization.html
> Do we expect the link to be stable? If so, then I think a link in the
> documentation would be useful.
This is the official OP-TEE documentation. So, yes, it should be stable.
I can put this link into the code somewhere.

Best regards, Volodymyr Babchuk
Xen-devel mailing list

  reply index

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 18:46 [Xen-devel] [PATCH v6 00/10] TEE mediator (and OP-TEE) support in XEN Volodymyr Babchuk
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 01/10] xen/arm: add generic TEE mediator framework Volodymyr Babchuk
2019-06-17 16:11   ` Stefano Stabellini
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 02/10] xen/arm: optee: add OP-TEE header files Volodymyr Babchuk
2019-06-15 18:39   ` Julien Grall
2019-06-17 15:24     ` Julien Grall
2019-06-17 16:28       ` Stefano Stabellini
2019-06-17 16:34         ` Julien Grall
2019-06-17 17:28           ` Stefano Stabellini
2019-06-19  8:20             ` Lars Kurth
2019-06-19 10:26               ` Julien Grall
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 03/10] xen/arm: optee: add OP-TEE mediator skeleton Volodymyr Babchuk
2019-06-19 11:01   ` Julien Grall
2019-06-19 11:03     ` Julien Grall
2019-06-19 15:44       ` Volodymyr Babchuk
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 04/10] xen/arm: optee: add fast calls handling Volodymyr Babchuk
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 05/10] xen/arm: optee: add std call handling Volodymyr Babchuk
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 06/10] xen/arm: optee: add support for RPC SHM buffers Volodymyr Babchuk
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 07/10] xen/arm: optee: add support for arbitrary shared memory Volodymyr Babchuk
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 08/10] xen/arm: optee: add support for RPC commands Volodymyr Babchuk
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 09/10] tools/arm: tee: add "tee" option for xl.cfg Volodymyr Babchuk
2019-06-15 19:10   ` Julien Grall
2019-06-18 11:19     ` Volodymyr Babchuk
2019-06-18 12:49       ` Julien Grall
2019-06-18 14:30         ` Volodymyr Babchuk [this message]
2019-06-18 15:19           ` Julien Grall
2019-06-18 15:23             ` Volodymyr Babchuk
2019-06-19 10:30               ` Julien Grall
2019-06-11 18:46 ` [Xen-devel] [PATCH v6 10/10] tools/arm: optee: create optee firmware node in DT if tee=optee Volodymyr Babchuk
2019-06-19 11:08 ` [Xen-devel] [PATCH v6 00/10] TEE mediator (and OP-TEE) support in XEN Julien Grall

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tvcn6k4r.fsf@epam.com \
    --to=volodymyr_babchuk@epam.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@arm.com \
    --cc=tee-dev@lists.linaro.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git