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

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


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 21 Jul 2023 15:08:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=wO/zXt2A6oeKhu/5wzxD6GGL5EOBASzIU5Bvhpl1mP0=; b=EIFBuDV88YeLhOguPIeXjOzhdxs+WRl4XS5P1LbK/uYTsTaR9qleN7nuP3UsE9kEdrNZ7nmNx9Qpi9Rn1J6rx2DvKaayg3Er3oM91QpwPdcM1KEihroebzFnyJQcrV8HzeODU1ULU7DXJ7ppUwZRDVgSl78P1OB+f/foyICKnvE5PWdxRwor2JOdlEYf8DZDGM6I4r107vHUaeqa+071KtTP/6w+kmVNU04wrYU0N447I43ZOIMbBeMj+AGyxlE/cvWxqBJyoFz8uQ/v/+SIiQwc2KA2J7MjffaxcClNP8eLFW09RuAj+UbbUQI0vGV5/S55rYyZNVz2UkNd7rI5iw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mc3DdGP7lnFt++9UkmnJam40DDas2OT80rWfv+xQm/ZpnVRocP/iVgZC15MENu8XHGQGiG6CDnafkiKvE9AgugoRr5kgrj2AYuBKbDBhqnrCG5oMxW9iYm8VKKfsb8nRpX9OE1GuLDgCGDP/4YoOKHFqijBQ8jxFTrxDl8c/3pSVmup/8+nJAJaH32ympVKH077VkJvfVbwfCaL0YcL9n+KDgDUbkvEWNf7CrL1iSAUfEBwkuc4VSIZYF1SJsWXD1arNAfV8RAsJqLR+x40qQ+rrHHQK3oImAFEGVrZkzFikuCodv5RAO9zy8Y6Y0rlall5InbE90L9GsAUhfMTayw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.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 13:08:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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)?

> 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 ...

Jan



 


Rackspace

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