On 22. Aug 2019, at 12:43, Julien Grall <julien.grall@arm.com> wrote:
Hi,
On 22/08/2019 11:20, Wieczorkiewicz, Pawel wrote:
Cross-compiler are nowadays widely available. So build testing your changes in common code would be the minimum.I wish it was that simple. Nevertheless, I will try to prepare an environment to perform such builds.
Cross-compiling the hypervisor is really easy ;).
1) Download the cross-compiler tarball (here one [1]) and uncompress it. You can also install the one provided by your distro.
2) Build Xen hypervisor. Here an example for arm64:
42sh> cd xen.git/xen
42sh> make XEN_TARGET_ARCH=arm64 CROSS_COMPILER=<triplet>-
In my case, I am using the Arm toolchain AArch64 GNU/Linux target (aarch64-linux-gnu). So the <triplet> would be aarch64-linux-gnu.
This is assuming you have the compilers binary in your PATH. If not, you can use give the full path:
CROSS_COMPILER=/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-
In this case, as you dropped the const from the prototype, you will need to do the same in the declaration.Yes, but I see 2 options here:
- Enable the feature also for Arm (I prefer that, but will not be able to test that in nearest future)
I think some of the code can be made common. So we could possibly rely on x86 for that. Additionally, IIRC, Konrad has a setup on the cubietruck for testing livepatch.
- Keep Arm excluded and sprinkle code with #ifdef CONFIG_X86
Please no #ifdef CONFIG_X86 in the common code. If you don't plan to support Arm, then we should introduce a new Kconfig that will gate all those changes.
Cheers,
[1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
--
Julien Grall