Add layer to support Jailhouse hypervisor
[AGL/meta-agl-devel.git] / meta-agl-jailhouse / recipes-kernel / linux / linux / 0006-arm-arm64-export-__hyp_stub_vectors.patch
1 From 27588702a6792ff86a57317ef60d6e218796598e Mon Sep 17 00:00:00 2001
2 From: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
3 Date: Wed, 7 Jun 2017 15:48:43 +0200
4 Subject: [PATCH 06/32] arm, arm64: export __hyp_stub_vectors
5
6 HVC_GET_VECTORS got removed. External hypervisors, like Jailhouse, need
7 this address when they are deactivated, in order to restore original
8 state.
9
10 Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
11 Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
12 ---
13  arch/arm/kernel/hyp-stub.S   | 2 ++
14  arch/arm64/kernel/hyp-stub.S | 2 ++
15  2 files changed, 4 insertions(+)
16
17 diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
18 index ae5020302de4..463366ccd2c9 100644
19 --- a/arch/arm/kernel/hyp-stub.S
20 +++ b/arch/arm/kernel/hyp-stub.S
21 @@ -6,6 +6,7 @@
22  #include <linux/init.h>
23  #include <linux/irqchip/arm-gic-v3.h>
24  #include <linux/linkage.h>
25 +#include <asm-generic/export.h>
26  #include <asm/assembler.h>
27  #include <asm/virt.h>
28  
29 @@ -269,4 +270,5 @@ __hyp_stub_trap:    W(b)    __hyp_stub_do_trap
30  __hyp_stub_irq:                W(b)    .
31  __hyp_stub_fiq:                W(b)    .
32  ENDPROC(__hyp_stub_vectors)
33 +EXPORT_SYMBOL_GPL(__hyp_stub_vectors)
34  
35 diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S
36 index 73d46070b315..ef2503bba71d 100644
37 --- a/arch/arm64/kernel/hyp-stub.S
38 +++ b/arch/arm64/kernel/hyp-stub.S
39 @@ -10,6 +10,7 @@
40  #include <linux/linkage.h>
41  #include <linux/irqchip/arm-gic-v3.h>
42  
43 +#include <asm-generic/export.h>
44  #include <asm/assembler.h>
45  #include <asm/kvm_arm.h>
46  #include <asm/kvm_asm.h>
47 @@ -42,6 +43,7 @@ ENTRY(__hyp_stub_vectors)
48         ventry  el1_fiq_invalid                 // FIQ 32-bit EL1
49         ventry  el1_error_invalid               // Error 32-bit EL1
50  ENDPROC(__hyp_stub_vectors)
51 +EXPORT_SYMBOL_GPL(__hyp_stub_vectors)
52  
53         .align 11
54  
55 -- 
56 2.11.0
57