[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker



Hi,

On 22/08/2019 11:20, Wieczorkiewicz, Pawel wrote:
On 22. Aug 2019, at 12:07, Julien Grall <julien.grall@xxxxxxx <mailto:julien.grall@xxxxxxx>> wrote:
On 22/08/2019 08:44, Wieczorkiewicz, Pawel wrote:
diff --git a/xen/include/xen/livepatch.h b/xen/include/xen/livepatch.h
index 2aec532ee2..a93126f631 100644
--- a/xen/include/xen/livepatch.h
+++ b/xen/include/xen/livepatch.h
@@ -117,7 +117,7 @@ int arch_livepatch_quiesce(void);
 void arch_livepatch_revive(void);
   void arch_livepatch_apply(struct livepatch_func *func);
-void arch_livepatch_revert(const struct livepatch_func *func);
+void arch_livepatch_revert(struct livepatch_func *func);

I doubt livepatch on Arm will compile after this change.

What would be you suggestion then?

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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.