Hi Varun,
Just a quick sync on what's been going since this last email.
A number of changes have been made to: -remove the gcc dependency, hafnium now only requires clang to build. -ability to provide a toolchain different from the one stored in prebuilt submodule (merged yesterday) -migrated and tested with recent clang versions (was clang 9) -ability to build on arm64 host (our need)
The prebuilt submodule still exists but the dependency to hardcoded toolchains has weakened.
I intend to tell more about those recent changes and what remains during a tech forum early next year, among: -remove toolchains from prebuilt? -split the hypervisor and spmc test configs into separate project/* directories -lessen the dependency to other 3rd party projects
Regards, Olivier.
________________________________________ From: Hafnium hafnium-bounces@lists.trustedfirmware.org on behalf of Olivier Deprez via Hafnium hafnium@lists.trustedfirmware.org Sent: 08 June 2021 16:00 To: Varun Wadekar Cc: Bo Yan; hafnium@lists.trustedfirmware.org Subject: Re: [Hafnium] .git submodules increase hafnium code size
Hi Varun,
As indicated earlier, we (Arm side) don't expect to progress on this front before Q3.
I'm gathering requirements and expect to discuss through a short presentation later in a tech forum or the ML.
Regards, Olivier.
________________________________________ From: Varun Wadekar vwadekar@nvidia.com Sent: 08 June 2021 15:21 To: Arunachalam Ganapathy; Olivier Deprez Cc: Bo Yan; hafnium@lists.trustedfirmware.org Subject: RE: .git submodules increase hafnium code size
Thanks Arun. We have taken the same approach. The changes I posted earlier expect all dependencies to be out of tree and provide mechanisms to pass the locations to the make system during compilation.
This is a real problem for us, and we would like a solution that works for the community too. @Olivier how should we move forward?
-----Original Message----- From: Arunachalam Ganapathy Arunachalam.Ganapathy@arm.com Sent: Tuesday, June 8, 2021 2:08 PM To: Varun Wadekar vwadekar@nvidia.com; Olivier Deprez Olivier.Deprez@arm.com Cc: Bo Yan byan@nvidia.com; hafnium@lists.trustedfirmware.org Subject: Re: .git submodules increase hafnium code size
External email: Use caution opening links or attachments
Hi Varun,
1- First in context of Total Compute delivery from Arm OSS platforms: a. ability to build only the SPMC on TC0 platform (not all reference targets such as qemu, rpi4, fvp) b. use a Yocto provided toolchain. @Arun, your view on how those two items were solved is beneficial to further elaborate our plans.
For Total Compute we wanted to skip cloning submodules (like driver/linux, linux, dtc) as only secure_hafnium.bin was required. Basically build only reference spm. Like: make PROJECT=reference_spm PLAT=TC this builds only secure hafnium for one platform.
There were some efforts put on 1.a and was able to build reference_spm for one platform. But Hafnium build inside yocto forced to clone all submodules (due to dependencies on prebuilt toolchains), so the changes were dropped and also the changes weren't clean enough to be upstreamed. Regarding 1.b we didn't try hafnium build using yocto toolchain.
Thanks, Arun
-----Original Message----- From: Varun Wadekar vwadekar@nvidia.com Sent: Monday, June 7, 2021 14:43 To: Varun Wadekar vwadekar@nvidia.com; Olivier Deprez Olivier.Deprez@arm.com; Arunachalam Ganapathy Arunachalam.Ganapathy@arm.com Cc: Bo Yan byan@nvidia.com; hafnium@lists.trustedfirmware.org hafnium@lists.trustedfirmware.org Subject: RE: .git submodules increase hafnium code size
Hi,
@Arun, your view on how those two items were solved is beneficial to further elaborate our plans.
@Arunachalam Ganapathy your comments on this topic would be very helpful.
Thanks.
-----Original Message----- From: Hafnium hafnium-bounces@lists.trustedfirmware.org On Behalf Of Varun Wadekar via Hafnium Sent: Monday, May 31, 2021 1:49 PM To: Olivier Deprez Olivier.Deprez@arm.com; hafnium@lists.trustedfirmware.org; Arunachalam Ganapathy Arunachalam.Ganapathy@arm.com Cc: Bo Yan byan@nvidia.com Subject: Re: [Hafnium] .git submodules increase hafnium code size
External email: Use caution opening links or attachments
Hi Olivier,
Thanks for answering my queries.
We are looking to deploy the following use case at NVIDIA.
<snip>
-ability to build only the SPMC (not all reference targets such as qemu, rpi4, fvp) -A distribution only requiring the Hypervisor/SPMC output binary ("out/reference/.../hafnium.bin") using any toolchain (be it arm64 or x86 host, and arbitrary clang version).
<snip>
As you noticed, the Hafnium Hypervisor/SPMC and test environment builds are closely coupled by the use of ninja/gn flow and scripts. We intend to approach those problems in the course of Q3 in Arm OSS roadmap.
[VW] Are there any local changes to decouple hafnium from its dependencies? We can evaluate Arm;s approach against what we use internally. Our changes moved the dependencies out of the tree and passed file locations to the build system with the help of command line arguments.
-Varun
-----Original Message----- From: Olivier Deprez Olivier.Deprez@arm.com Sent: Monday, May 31, 2021 11:03 AM To: hafnium@lists.trustedfirmware.org; Varun Wadekar vwadekar@nvidia.com; Arunachalam Ganapathy Arunachalam.Ganapathy@arm.com Cc: Bo Yan byan@nvidia.com Subject: Re: .git submodules increase hafnium code size
External email: Use caution opening links or attachments
Hi Varun,
We had similar requests raised internally. 1- First in context of Total Compute delivery from Arm OSS platforms: a. ability to build only the SPMC on TC0 platform (not all reference targets such as qemu, rpi4, fvp) b. use a Yocto provided toolchain. @Arun, your view on how those two items were solved is beneficial to further elaborate our plans. 2- A similar request as 1.b to build Hafnium as part of a distribution on arm64 host: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper....
In my view there are two consumers: -A distribution only requiring the Hypervisor/SPMC output binary ("out/reference/.../hafnium.bin") using any toolchain (be it arm64 or x86 host, and arbitrary clang version). -The Hf CI framework/automation needs the above, plus the test framework and tests (dependency on googletest, linux submodules etc). It's important to keep this item alive while trying to solve above item.
As you noticed, the Hafnium Hypervisor/SPMC and test environment builds are closely coupled by the use of ninja/gn flow and scripts. They are using a fixed toolchain version through prebuilts to ensure builds are "reproducible", in particular with regards to the Hafnium CI.
We intend to approach those problems in the course of Q3 in Arm OSS roadmap. As an early exploration we already have: -clang 12 compiler upgrade. This is necessary if wiling to use any arbitrary clang version: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tru...) -Ability to build on arm64 host (done, internally). -Identify the flow/script changes such that external dependencies can be used (on-going, internally). I thought of localizing common dependencies to python/shell scripts by the use of definition files included in the mentioned scripts. This is only an early investigation, I will check how this intersects the changes you provided.
Regards, Olivier.
From: Hafnium hafnium-bounces@lists.trustedfirmware.org on behalf of Varun Wadekar via Hafnium hafnium@lists.trustedfirmware.org Sent: 28 May 2021 16:47 To: hafnium@lists.trustedfirmware.org hafnium@lists.trustedfirmware.org Cc: Bo Yan byan@nvidia.com Subject: [Hafnium] .git submodules increase hafnium code size
Hi,
We at NVIDIA are evaluating Hafnium. During the initial investigation, we found out that the repository size (in terms of MB) is huge. This is mostly because of the "git submodules" used by the project. This is a great way to deliver Hafnium with its dependencies in one go.
But we think that the size can be trimmed by moving the toolchain, linux folder, googletest and dtc compiler out, leaving just the Hafnium code in the project. This way, companies like us can pick and choose instead of having to use everything. In a bid to ease the pain internally and only use the Hafnium code base we have crafted the following changes:
1. hafnium: support external projects (I10a07de3) * Gerrit Code Review (trustedfirmware.org)https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.trustedfirmware.org%2Fc%2Fhafnium%2Fhafnium%2F%2B%2F10142&data=04%7C01%7Cvwadekar%40nvidia.com%7C7de15ed2bf23435439f708d92a7e6b68%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637587545626800146%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=76B4J4VIUpoOhaRu0kTGG7aywWOqda8tIRwRPaVFD3o%3D&reserved=0 2. hafnium: build with dtc and googletest out of tree (I057c9ad6) * Gerrit Code Review (trustedfirmware.org)https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.trustedfirmware.org%2Fc%2Fhafnium%2Fhafnium%2F%2B%2F10144&data=04%7C01%7Cvwadekar%40nvidia.com%7C7de15ed2bf23435439f708d92a7e6b68%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637587545626800146%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=d6zUbC4v3B%2BnYlF%2Bx8ZlEdc0iOLZvA7kA%2FCKdkwg%2Fws%3D&reserved=0 3. build: support external toolchain (Iafd029c1) * Gerrit Code Review (trustedfirmware.org)https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.trustedfirmware.org%2Fc%2Fhafnium%2Fhafnium%2F%2B%2F10145&data=04%7C01%7Cvwadekar%40nvidia.com%7C7de15ed2bf23435439f708d92a7e6b68%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637587545626810096%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BuwP789ZfcL43LDS2Oh27%2FB6xNEjS1OjwmnWNJgw53Q%3D&reserved=0
This series does not have the patch to use an out of tree linux codebase. I assume these patches wont be acceptable in their current state, so would like to know how the community plans to handle this situation.
The code size is a real concern for us, as we already have copies of the dependencies in our codebase, so have no use for these duplicates.
Thanks. -- Hafnium mailing list Hafnium@lists.trustedfirmware.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trus... -- Hafnium mailing list Hafnium@lists.trustedfirmware.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trus... -- Hafnium mailing list Hafnium@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/hafnium