From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- ...__boot_cpu_mode-for-use-in-Jailhouse-driv.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meta-agl-devel/meta-agl-jailhouse/recipes-kernel/linux/linux/0004-arm-Export-__boot_cpu_mode-for-use-in-Jailhouse-driv.patch (limited to 'meta-agl-devel/meta-agl-jailhouse/recipes-kernel/linux/linux/0004-arm-Export-__boot_cpu_mode-for-use-in-Jailhouse-driv.patch') diff --git a/meta-agl-devel/meta-agl-jailhouse/recipes-kernel/linux/linux/0004-arm-Export-__boot_cpu_mode-for-use-in-Jailhouse-driv.patch b/meta-agl-devel/meta-agl-jailhouse/recipes-kernel/linux/linux/0004-arm-Export-__boot_cpu_mode-for-use-in-Jailhouse-driv.patch new file mode 100644 index 00000000..6e4470f0 --- /dev/null +++ b/meta-agl-devel/meta-agl-jailhouse/recipes-kernel/linux/linux/0004-arm-Export-__boot_cpu_mode-for-use-in-Jailhouse-driv.patch @@ -0,0 +1,43 @@ +From 56e5aace5a675af0557b87a137b98e40454d8e22 Mon Sep 17 00:00:00 2001 +From: Jan Kiszka +Date: Sun, 3 Jul 2016 10:02:40 +0200 +Subject: [PATCH 04/32] arm: Export __boot_cpu_mode for use in Jailhouse driver + module + +Onlining a CPU while Jailhouse was running sets BOOT_CPU_MODE_MISMATCH +because the kernel detect that the CPU will now only come up in SVC +mode. Therefore, we need to fix up the flag after disabling Jailhouse +again. + +Moreover, exporting the symbol allows to use is_hyp_mode_available() in +the driver, thus prevents us from crashing during Jailhouse activation +when there is no hyp stub installed. + +Signed-off-by: Jan Kiszka +--- + arch/arm/kernel/armksyms.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c +index 98bdea51089d..f2fa635bccf7 100644 +--- a/arch/arm/kernel/armksyms.c ++++ b/arch/arm/kernel/armksyms.c +@@ -17,6 +17,7 @@ + + #include + #include ++#include + + /* + * libgcc functions - functions that are used internally by the +@@ -176,3 +177,7 @@ EXPORT_SYMBOL(__pv_offset); + EXPORT_SYMBOL(__arm_smccc_smc); + EXPORT_SYMBOL(__arm_smccc_hvc); + #endif ++ ++#ifdef CONFIG_ARM_VIRT_EXT ++EXPORT_SYMBOL_GPL(__boot_cpu_mode); ++#endif +-- +2.11.0 + -- cgit 1.2.3-korg