All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bertrand Marquis <bertrand.marquis@arm.com>
To: xen-devel@lists.xenproject.org
Cc: jens.wiklander@linaro.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: [PATCH] xen/arm: Move TEE mediators in a kconfig submenu
Date: Fri, 21 Jul 2023 10:02:04 +0200	[thread overview]
Message-ID: <a44f74559f52d1fa90a3f77390e7d121c9cd848e.1689926422.git.bertrand.marquis@arm.com> (raw)

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 <bertrand.marquis@arm.com>
---
 xen/arch/arm/Kconfig      |  7 -------
 xen/arch/arm/Makefile     |  2 +-
 xen/arch/arm/tee/Kconfig  | 18 ++++++++++++++++--
 xen/arch/arm/tee/Makefile |  2 +-
 4 files changed, 18 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/Makefile b/xen/arch/arm/Makefile
index 7bf07e992046..d47d5c20aa73 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -5,7 +5,7 @@ obj-$(CONFIG_HAS_PCI) += pci/
 ifneq ($(CONFIG_NO_PLAT),y)
 obj-y += platforms/
 endif
-obj-$(CONFIG_TEE) += tee/
+obj-y += tee/
 obj-$(CONFIG_HAS_VPCI) += vpci.o
 
 obj-$(CONFIG_HAS_ALTERNATIVE) += alternative.o
diff --git a/xen/arch/arm/tee/Kconfig b/xen/arch/arm/tee/Kconfig
index 923f08ba8cb7..cecbf7e12b43 100644
--- a/xen/arch/arm/tee/Kconfig
+++ b/xen/arch/arm/tee/Kconfig
@@ -1,7 +1,17 @@
+menu "TEE mediators"
+	visible if UNSUPPORTED
+
+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
 	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
 	default n
 	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
-- 
2.39.2 (Apple Git-143)



             reply	other threads:[~2023-07-21  8:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21  8:02 Bertrand Marquis [this message]
2023-07-21  8:52 ` [PATCH] xen/arm: Move TEE mediators in a kconfig submenu Julien Grall
2023-07-21  9:07   ` Bertrand Marquis
2023-07-21  9:09     ` Julien Grall
2023-07-21  8:52 ` Jan Beulich
2023-07-21  9:02   ` Bertrand Marquis
2023-07-21 10:45     ` Jan Beulich
2023-07-21 12:27       ` Bertrand Marquis
2023-07-21 13:08         ` Jan Beulich
2023-07-21 14:07           ` Bertrand Marquis
2023-07-21 14:24             ` Jan Beulich
2023-07-21 14:34               ` Bertrand Marquis
2023-07-25 14:30                 ` 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=a44f74559f52d1fa90a3f77390e7d121c9cd848e.1689926422.git.bertrand.marquis@arm.com \
    --to=bertrand.marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jens.wiklander@linaro.org \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.