From patchwork Fri Jul 21 09:23:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bertrand Marquis X-Patchwork-Id: 13321692 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB034EB64DC for ; Fri, 21 Jul 2023 09:24:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.567439.886485 (Exim 4.92) (envelope-from ) id 1qMmMh-0005iV-3s; Fri, 21 Jul 2023 09:23:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 567439.886485; Fri, 21 Jul 2023 09:23:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qMmMh-0005iO-18; Fri, 21 Jul 2023 09:23:59 +0000 Received: by outflank-mailman (input) for mailman id 567439; Fri, 21 Jul 2023 09:23:57 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qMmMf-0005iG-HG for xen-devel@lists.xenproject.org; Fri, 21 Jul 2023 09:23:57 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 4fdc006c-27a8-11ee-8611-37d641c3527e; Fri, 21 Jul 2023 11:23:54 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 348F02F4; Fri, 21 Jul 2023 02:24:37 -0700 (PDT) Received: from C3HXLD123V.emea.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 89FFA3F67D; Fri, 21 Jul 2023 02:23:52 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4fdc006c-27a8-11ee-8611-37d641c3527e From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: jens.wiklander@linaro.org, Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH v2] xen/arm: Move TEE mediators in a kconfig submenu Date: Fri, 21 Jul 2023 11:23:49 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 (Apple Git-143) MIME-Version: 1.0 Rework TEE mediators to put them under a submenu in Kconfig. The submenu is only visible if UNSUPPORTED is activated as all currently existing mediators are UNSUPPORTED. While there rework a bit the configuration so that OP-TEE and FF-A mediators are selecting the generic TEE interface instead of depending on it. Make the TEE option hidden as it is of no interest for anyone to select it without one of the mediators so having them select it instead should be enough. Rework makefile inclusion and selection so that generic TEE is included only when selected and include the tee Makefile all the time making the directory tee self contained. Signed-off-by: Bertrand Marquis --- Changes in v2: - only included tee subdirectory in makefile if CONFIG_TEE is selected (reverts to state before patch) - remove help in hidden TEE config - rebase on top of staging --- xen/arch/arm/Kconfig | 7 ------- xen/arch/arm/tee/Kconfig | 17 ++++++++++++++--- xen/arch/arm/tee/Makefile | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 439cc94f3344..fd57a82dd284 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -175,13 +175,6 @@ config ARM64_BTI Branch Target Identification support. This feature is not supported in Xen. -config TEE - bool "Enable TEE mediators support (UNSUPPORTED)" if UNSUPPORTED - 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. - source "arch/arm/tee/Kconfig" config STATIC_SHM diff --git a/xen/arch/arm/tee/Kconfig b/xen/arch/arm/tee/Kconfig index db3ea78faaaa..c5b0f88d7522 100644 --- a/xen/arch/arm/tee/Kconfig +++ b/xen/arch/arm/tee/Kconfig @@ -1,7 +1,14 @@ +menu "TEE mediators" + visible if UNSUPPORTED + +config TEE + bool + default n + config OPTEE - bool "Enable OP-TEE mediator" + bool "Enable OP-TEE mediator (UNSUPPORTED)" if UNSUPPORTED 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 @@ -12,10 +19,14 @@ config OPTEE config FFA bool "Enable FF-A mediator support (UNSUPPORTED)" if UNSUPPORTED default n - depends on ARM_64 && TEE + depends on ARM_64 + select TEE help This option enables a minimal FF-A mediator. The mediator is generic as it follows the FF-A specification [1], but it only implements a small subset of the specification. [1] https://developer.arm.com/documentation/den0077/latest + +endmenu + diff --git a/xen/arch/arm/tee/Makefile b/xen/arch/arm/tee/Makefile index 58a1015e40e0..1ef49a271fdb 100644 --- a/xen/arch/arm/tee/Makefile +++ b/xen/arch/arm/tee/Makefile @@ -1,3 +1,3 @@ obj-$(CONFIG_FFA) += ffa.o -obj-y += tee.o +obj-$(CONFIG_TEE) += tee.o obj-$(CONFIG_OPTEE) += optee.o