Skip to content

Conversation

@jiaxli-QC
Copy link

… for Qualcomm TEE (QTEE)

We are planning to replace QPTEE with QCOMTEE on all QCOM-released kernel versions. QTEE allows Trusted Applications (TAs) and services to run securely and offers the same functionality as OPTEE.

Link: #121

CONFIG_TEE=y
CONFIG_OPTEE=y
# CONFIG_OPTEE is not set
CONFIG_QCOMTEE=y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPTEE and QCOMTEE cannot exist together ? How do we plan to support pristine upstream builds on our targets in that case ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are @shashim-quic OPTEE and QCOMTEE both cannot exit together in system.
Here : OPTEE ---> OPTEEOS where is QCOMTEE <---->QTEE OS . In a given target either OPTEE will be enabled or QTEE will be enabled.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are @shashim-quic OPTEE and QCOMTEE both cannot exit together in system. Here : OPTEE ---> OPTEEOS where is QCOMTEE <---->QTEE OS . In a given target either OPTEE will be enabled or QTEE will be enabled.

then how do we support pristine upstream builds ? (assuming QCOMTEE won't be enabled there)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the information on QLI Kernel Mainline Definition, adding CONFIG_QCOMTEE to qcom_addons.config helps keep the build process clean and prevents unnecessary driver conflicts. Since the QCOMTEE driver only needs to be enabled on the QCOM Platform, this approach is more suitable for us.

However, I searched the entire kernel tree in the /teck/all/configure branch but couldn't find a configuration for the custom build variant. Could you share the strategies for working with the /teck/all/configure branch? Many thanks

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the information on QLI Kernel Mainline Definition, adding CONFIG_QCOMTEE to qcom_addons.config helps keep the build process clean and prevents unnecessary driver conflicts. Since the QCOMTEE driver only needs to be enabled on the QCOM Platform, this approach is more suitable for us.

However, I searched the entire kernel tree in the /teck/all/configure branch but couldn't find a configuration for the custom build variant. Could you share the strategies for working with the /teck/all/configure branch? Many thanks

There is no separate custom configuration, please refer http://go/qlikernelmainline which captures major policy requirements from kernel

  • single kernel image for all targets and variants
  • support for clean overlay (via DLKMs and distro configurations like blacklisting)

QCOMTEE in my opinion is not a downstream addition but an upstream one. My question is how are you planning to support QCOMTEE in upstream builds for QC platforms ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The QCOMTEE driver has been merged into the kernel topic branch. #121 Currently, both QCOMTEE and OPTEE are present in the kernel topic branch, and we control which TEE driver is compiled through the defconfig. We plan to enable QCOMTEE instead of OPTEE for the upstream build by applying this patch.

May be I am not clear. What I mean is - how would upstream builds with upstream arch/arm64/configs/defconfig work on qcom targets.

Please note that all KLM targets are being tested in community kernel CI as well. Without QCOM TEE enabled in upstream defconfig, what would be the impact ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shashim-quic ,
so in that case we can have optee as it enabled and make qcomtee also 1.
CONFIG_OPTEE=y
CONFIG_QCOMTEE=y

we can have both driver in place simultaneously.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jiaxli-QC , Please update the enablement as
CONFIG_OPTEE=y
CONFIG_QCOMTEE=y

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both OPTEE and QCOMTEE drivers can be used at the same time. Since they use different CMD IDs, they will not affect each other.
All the test cases have passed.

@abinjose-qualcomm abinjose-qualcomm mentioned this pull request Aug 6, 2025
… for Qualcomm TEE (QTEE)

We are planning to replace QPTEE with QCOMTEE on all QCOM-released kernel
versions. QTEE allows Trusted Applications (TAs) and services to run
securely and offers the same functionality as OPTEE.

Signed-off-by: Jiaxing Li <[email protected]>
Link: qualcomm-linux#121
@shashim-quic shashim-quic merged commit b4a41bd into qualcomm-linux:tech/all/config Aug 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants