[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: Move TEE mediators in a kconfig submenu


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 21 Jul 2023 14:07:46 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Sx3dnexRw5NDd9Tu1cAgD+pc9Q6SBtS4JugeJb3CAA4=; b=WVXmG9xoi+JB4DEn2ug2JppOYJNWLjqThMK6yKhHv0Nya0ZvogQhQf47BvdJVtePdkb7y7TKJwpR/hb4XBQ40KMpsmc880U7kwZI6/5WGU6ZtpD03jYnf2iIy+ZMQKP8/Qsn9gx6k3aDg0COvKFhAeR9FnGNLKOJzwPQap9+yi5aGfNerkBltjtx2MILmKlswWhEEn7GsNg7X2ehS8rhLMaxHdeFGAVI+Ge1QLu0+eTRLdZzAjz/1WBcCrX9K/0IzuCBeIphi9ke6dP90+KTpQcH4wUbsUWy/o8qny/juvZjBql6Mfrn+ObsYjluzXULf4dupt5tUiTUocq2E3DDmA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YD6806nosYnbLE6o5V5suJSaTDqBz1hSQEW1l06h0YVc3zmkSHku34PJHvc9sL2QcwL4ZCB0sATex6AMOzFL28Ic5RvrhBKSPo+K/bDGJbKs1q8Qd9fbBrvRwLm7uG0uOmzyqBRrSoWcnh6ObrZBxNbNDLpPLFY0vreisXfHjxX+RA41VAR3tgC4y510FvjR3JB9QP1VDBOgzVaziNBh93zpqOV04EdInXuRqu6X2mFyWouNwz0cICp83KKeau94hGgkW6dNSDi8ayw4JGZDMVYR1P7CVHe0phwjFwa9/uxSkIUIbGDydlT22ULJCmt3VGkbA1FkwWCxKuMA8pYhKQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jens Wiklander <jens.wiklander@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 21 Jul 2023 14:08:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZu6nFJdPelAC9nE2wzAZF/5qPkK/D6iMAgAACsoCAABzbgIAAHFKAgAALbgCAABCjAA==
  • Thread-topic: [PATCH] xen/arm: Move TEE mediators in a kconfig submenu

Hi Jan,

> On 21 Jul 2023, at 15:08, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 21.07.2023 14:27, Bertrand Marquis wrote:
>> Hi Jan,
>> 
>>> On 21 Jul 2023, at 12:45, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>> 
>>> On 21.07.2023 11:02, Bertrand Marquis wrote:
>>>>> On 21 Jul 2023, at 10:52, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>>> On 21.07.2023 10:02, Bertrand Marquis wrote:
>>>>>> --- a/xen/arch/arm/tee/Kconfig
>>>>>> +++ b/xen/arch/arm/tee/Kconfig
>>>>>> @@ -1,7 +1,17 @@
>>>>>> +menu "TEE mediators"
>>>>>> + visible if UNSUPPORTED
>>>>> 
>>>>> With this ...
>>>>> 
>>>>>> +config TEE
>>>>>> + bool
>>>>>> + default n
>>>>>> + help
>>>>>> +  This option enables generic TEE mediators support. It allows guests
>>>>>> +  to access real TEE via one of TEE mediators implemented in XEN.
>>>>>> +
>>>>>> config OPTEE
>>>>>> - bool "Enable OP-TEE mediator"
>>>>>> + bool "Enable OP-TEE mediator (UNSUPPORTED)" if UNSUPPORTED
>>>>> 
>>>>> ... you shouldn't need the "if" here, and ...
>>>>> 
>>>>>> default n
>>>>>> - depends on TEE
>>>>>> + select TEE
>>>>>> help
>>>>>> Enable the OP-TEE mediator. It allows guests to access
>>>>>> OP-TEE running on your platform. This requires
>>>>>> @@ -13,9 +23,13 @@ config FFA
>>>>>> bool "Enable FF-A mediator support (UNSUPPORTED)" if UNSUPPORTED
>>>>> 
>>>>> ... you could drop the one here. I think.
>>>> 
>>>> visible if is only for the GUI/ncurse display but the if is required
>>>> to make sure that a .config file cannot set CONFIG_TEE or
>>>> CONFIG_FFA if. UNSUPPORTED is not selected.
>>> 
>>> Is what you describe "depends on"? "if" controls merely prompt
>>> visibility aiui.
>> 
>> So you think that having  CONFIG_FFA without CONFIG_UNSUPPORTED
>> would be a valid configuration and the if is only here for the gui ?
>> 
>> I tested that with the following procedure:
>> - use menuconfig, select UNSUPPORTED and FFA
>> - edit .config and disable UNSUPPORTED but keep FFA
>> - build
>> - CONFIG_FFA is removed from .config
>> 
>> Now what puzzles me is that i did the same but removing the if UNSUPPORTED
>> for TEE and FFA and i have exactly the same behaviour.
>> 
>> So it seems that "if UNSUPPORTED" and visibility all behave in the same way
>> as depends on which i was not expecting.
> 
> Hmm, maybe that's a bug in our variant of kconfig (we didn't sync
> for quite some time)?

It could be but if it is the case and we update we might end up with
people getting UNSUPPORTED features in where they would not
have been before (because the build is cleaning up .config).

> 
>> So what should i keep or remove here ?
> 
> My understanding so far was that "visibility" merely hides all prompts
> underneath (but then I use the command line version of the tool, not
> menuconfig), so it largely is shorthand for adding "if" to all enclosed
> prompts. Therefore I think all the "if UNSUPPORTED" are redundant and
> could be dropped. But then I'm also working from the understanding that
> "depends on" would behave somewhat differently ...

If that is ok with you I would rather keep them so that making one of them
SUPPORTED one day will not end up in wrongly making the other one
supported to. The visible if i added was more to "beautify" a bit when
unsupported is not selected so that we do not have an empty menu.

Cheers
Bertrand


> 
> Jan





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.