xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Cc: Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Jens Wiklander <jens.wiklander@linaro.org>,
	xen-devel@lists.xen.org
Subject: Re: [RFC 4/4] arm: tee: add basic OP-TEE mediator
Date: Thu, 19 Oct 2017 17:52:24 +0100	[thread overview]
Message-ID: <90d946d0-dcaa-4a64-092c-b9aa765a6363@linaro.org> (raw)
In-Reply-To: <20171019163755.GB11787@EPUAKYIW2556.kyiv.epam.com>

Hi,

On 19/10/17 17:37, Volodymyr Babchuk wrote:
> On Thu, Oct 19, 2017 at 05:12:17PM +0100, Julien Grall wrote:
> 
> Hi Julien,
> 
>>>>>>>>> +    if ( rc < 0 )
>>>>>>>>> +    {
>>>>>>>>> +        gprintk(XENLOG_INFO, "OP-TEE: Can't map static shm for Dom0: %d", rc);
>>>>>>>>
>>>>>>>> gprintk already dump the domid. So no need to say Dom0.
>>>>>>> I just wanted to emphasis that we mappaed memory for Dom0. Will remove.
>>>>>>
>>>>>> gprintk will printk d0. So there are no point to say it a second time...
>>>>>>>
>>>>>>>>> +        set_user_reg(regs, 0, OPTEE_SMC_RETURN_ENOTAVAIL);
>>>>>>>>> +    }
>>>>>>>>> +
>>>>>>>>> +    return true;
>>>>>>>>> +}
>>>>>>>>> +
>>>>>>>>> +static bool handle_exchange_capabilities(struct cpu_user_regs *regs)
>>>>>>>>> +{
>>>>>>>>> +        forward_call(regs);
>>>>>>>>> +
>>>>>>>>> +        printk("handle_exchange_capabilities\n");
>>>>>>>>
>>>>>>>> Same here, no plain prink.
>>>>>>> Sorry, this is another debug print. Missed it when formatted patches.
>>>>>>>
>>>>>>>>> +        /* Return error back to the guest */
>>>>>>>>> +        if ( get_user_reg(regs, 0) != OPTEE_SMC_RETURN_OK)
>>>>>>>>> +            return true;
>>>>>>>>> +
>>>>>>>>> +        /* Don't allow guests to work without dynamic SHM */
>>>>>>>>
>>>>>>>> Hmmm? But you don't support guests today. So why are you checking that?
>>>>>>> This is a RFC. Will remove this parts of the code in a proper patch series.
>>>>>>>
>>>>>>> I just wanted to ensure that community is okay with proposed approach and
>>>>>>> to show how minimalistic mediator can look.
>>>>>> I don't think this is true. You only show how easy it is to let Dom0
>>>>>> accessing TEE. And as I said in the cover letter, this is not the
>>>>>> controversial part.
>>>>> Actually I wanted to show approach when mediator resides right in xen.
>>>>> I got valuable input from you. Now I see that I must completely rework the
>>>>> first patch. And, probably, show more comprehensive support from OP-TEE side.
>>>>>
>>>>>> The more controversial one is the guest support that you completely left
>>>>>> aside. I believe this part will not be as minimalistic as you think because
>>>>>> you need to translate buffer address and prevent those buffers to disappear
>>>>>> under your feet.
>>>>> Yes. I plan to copy all buffers where IPAs presented to another place,
>>>>> so DomU will not be able to see PAs during translation. And I plan to
>>>>> pin all DomU pages with a data. Also I'll read from guest pages only
>>>>> once. I think, this will be enough.
>>>>>
>>>>>> There are probably other problem to fix...
>>>>> Probably yes...
>>>>>
>>>>> I think, I'll focus on OP-TEE side right now and come back when there will
>>>>> be more more to show.
>>>>
>>>> To clarify my view. I am not against a temporary support of OP-TEE for the
>>>> hardware domain in Xen. But it does not mean I would be ready to see  the a
>>>> full OP-TEE support for guests in Xen.
>>> Hm. What did you mean in last sentence? Our (here, at EPAM) target is full
>>> virtualization support for OP-TEE. If you don't want to see it in Xen,
>>> then what another ways we have?
>>
>> Sorry it was not clear enough. I meant that whilst I am happy to see OP-TEE
>> support for the hardware domain in the hypervisor, we still need to discuss
>> on the approach for guests.
> Excuse me, I still didn't get it. You imply that we need some
> completely different approach for guests? Or I can stick with current
> approach, just add more restrictions?
> 
> Under "current approach" I mostly mean "handle SMCs to TEE at EL2" as
> opposed to "handle them in stubdom". Half patches of this RFC should
> be severely reworked anyways.

Let me answer on your cover letter. That would be easier to draw a 
decision with your last e-mail.

Cheers,

-- 
Julien Grall

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

  reply	other threads:[~2017-10-19 16:52 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 19:01 [RFC 0/4] TEE mediator framework + OP-TEE mediator Volodymyr Babchuk
2017-10-11 19:01 ` [RFC 1/4] arm: add SMC wrapper that is compatible with SMCCC Volodymyr Babchuk
2017-10-16 14:53   ` Julien Grall
2017-10-11 19:01 ` [RFC 2/4] arm: add generic TEE mediator framework Volodymyr Babchuk
2017-10-16 13:00   ` Julien Grall
2017-10-17 16:22     ` Volodymyr Babchuk
2017-10-17 16:39       ` Julien Grall
2017-10-17 17:22         ` Volodymyr Babchuk
2017-10-17 17:35           ` Julien Grall
2017-10-11 19:01 ` [RFC 3/4] arm: tee: add OP-TEE header files Volodymyr Babchuk
2017-10-16 14:04   ` Julien Grall
2017-10-17 16:24     ` Volodymyr Babchuk
2017-10-17 16:41       ` Julien Grall
2017-10-11 19:01 ` [RFC 4/4] arm: tee: add basic OP-TEE mediator Volodymyr Babchuk
2017-10-16 14:36   ` Julien Grall
2017-10-17 17:08     ` Volodymyr Babchuk
2017-10-17 17:30       ` Julien Grall
2017-10-17 18:57         ` Volodymyr Babchuk
2017-10-19 14:01           ` Julien Grall
2017-10-19 15:33             ` Volodymyr Babchuk
2017-10-19 16:12               ` Julien Grall
2017-10-19 16:37                 ` Volodymyr Babchuk
2017-10-19 16:52                   ` Julien Grall [this message]
2017-10-16 12:00 ` [RFC 0/4] TEE mediator framework + " Julien Grall
2017-10-17 15:59   ` Volodymyr Babchuk
2017-10-20 13:11     ` Julien Grall
2017-10-20 16:57       ` Tamas K Lengyel
2017-10-20 17:46         ` Volodymyr Babchuk
2017-10-20 17:37       ` Volodymyr Babchuk
2017-10-23 16:59         ` Julien Grall
2017-10-23 20:11           ` Volodymyr Babchuk
2017-10-23 21:26             ` Stefano Stabellini
2017-10-24 16:33               ` Volodymyr Babchuk
2017-10-24 21:33                 ` Stefano Stabellini
2017-10-27 13:47                   ` Julien Grall
2017-10-27 19:59                     ` Stefano Stabellini
2017-10-27 20:06                       ` Julien Grall
2017-10-24 17:33             ` Julien Grall
2017-10-24 19:02               ` Volodymyr Babchuk
2017-11-02 13:17                 ` Julien Grall
2017-11-02 16:53                   ` Volodymyr Babchuk
2017-11-02 17:49                     ` Julien Grall
2017-11-02 20:07                       ` Volodymyr Babchuk
2017-11-07 16:03                         ` 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=90d946d0-dcaa-4a64-092c-b9aa765a6363@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=jens.wiklander@linaro.org \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=volodymyr_babchuk@epam.com \
    --cc=xen-devel@lists.xen.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).