xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Stefano Stabellini <sstabellini@kernel.org>,
	Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, stuart.yoder@arm.com
Subject: Re: [RFC] WIP: optee: add OP-TEE mediator
Date: Wed, 6 Dec 2017 22:39:47 +0000	[thread overview]
Message-ID: <dc585624-e88b-389e-c34c-95778dd0ca9c@linaro.org> (raw)
In-Reply-To: <79401ae2-a697-948e-3a2b-1c618d32004c@linaro.org>

Hi,

Answering to myself.

On 12/04/2017 02:30 PM, Julien Grall wrote:
> On 01/12/17 22:58, Stefano Stabellini wrote:
>> On Mon, 27 Nov 2017, Volodymyr Babchuk wrote:
>> = Xen command forwarding =
>>
>> In the code below, it looks like Xen is forwarding everything to OP-TEE.
>> Are there some commands Xen should avoid forwarding? Should we have a
>> whitelist or a blacklist?
>>
>>
>> = Long running OP-TEE commands and interruptions =
>>
>> I have been told that some OP-TEE RPC commands might take long to
>> complete. Is that right? Like for example one of the
>> OPTEE_MSG_RPC_CMD_*?
>>
>> If so, we need to think what to do in those cases. Specifically, do we
>> need a technique to restart certain commands in Xen, so that when they
>> run for too long and get interrupted by something (such as an
>> interrupt) we know how to restart them? In fact, do we need to setup a
>> timer interrupt to make sure the command doesn't block Xen for too long,
>> consuming the next vcpu's slot as well?
> 
> I am not sure to understand your suggestion here. Where do you want that 
> timer? In Xen? If so, I don't think this could work. That's OP-TEE job 
> to break down long running operation.
> 
> This is very similar to when a guest is doing an hypercall. Even if 
> setup a timer, the interrupt will only be received once the hypercall is 
> done (or Xen decided to preempt it).

So from Stuart's e-mail, I was slightly wrong about this. Most of the 
time a timer interrupt would get OP-TEE stopping his work and then 
return to the hypervisor. Although, this is still at the will of OP-TEE :).

The scheduler is already setting a timer interrupt to prevent a guest 
running outside of its slice. So I think this would do the job here to 
preempt OP-TEE.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2017-12-06 22:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 11:54 Next Xen Arm Community call - Wednesday 22nd November Julien Grall
2017-11-16 12:47 ` Artem Mygaiev
2017-11-16 18:58   ` Stefano Stabellini
2017-11-20 18:05 ` Julien Grall
2017-11-21 14:34 ` Julien Grall
2017-11-27 17:01 ` [RFC] WIP: optee: add OP-TEE mediator Volodymyr Babchuk
2017-12-01 22:58   ` Stefano Stabellini
2017-12-04 14:30     ` Julien Grall
2017-12-04 16:24       ` Volodymyr Babchuk
2017-12-04 16:29         ` Julien Grall
2017-12-06 22:39       ` Julien Grall [this message]
2017-12-04 14:46     ` Andrew Cooper
2017-12-04 16:15     ` Volodymyr Babchuk
2017-12-04 16:27       ` Julien Grall
2017-12-04 18:32         ` Volodymyr Babchuk
2017-12-04 22:04           ` Stefano Stabellini
2017-12-05 11:14             ` Julien Grall
     [not found]           ` <f9fe1cb6-8700-99ba-ee62-2217fb5eb041@linaro.org>
     [not found]             ` <20171204185929.GB30163@EPUAKYIW2556.kyiv.epam.com>
     [not found]               ` <a6a05ad8-f335-00a2-cdd0-add81deb87bf@linaro.org>
     [not found]                 ` <2ee9297a-fcb8-c1c0-8ca7-91b9adbcd5b1@epam.com>
     [not found]                   ` <a7af95e4-09cf-22f8-b8cd-23a0cb5baae8@linaro.org>
2017-12-05 15:36                     ` Stuart Yoder
2017-12-06 22:31                       ` Julien Grall
2017-12-07 16:32                         ` Stuart Yoder
2017-12-04 22:06       ` Stefano Stabellini
2017-12-05 13:07         ` Volodymyr Babchuk

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=dc585624-e88b-389e-c34c-95778dd0ca9c@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=stuart.yoder@arm.com \
    --cc=volodymyr_babchuk@epam.com \
    --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).