[PATCH 45/50] arm64: Switch to kernel 4.7+ hyp-stub interface

7 views
Skip to first unread message

Jan Kiszka

unread,
Oct 18, 2016, 4:09:31 AM10/18/16
to jailho...@googlegroups.com, Antonios Motakis, Claudio Fontana, Dmitry Voytik, Marc Zyngier, Mark Rutland
Kernel 4.7 changed the hyp-stub interface: x0 now encodes the request,
and for SET_VECTORS, x1 holds the address.

Switch over unconditionally. We can still decide later if we want to
make legacy kernel support optional.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
hypervisor/arch/arm64/entry.S | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/arm64/entry.S b/hypervisor/arch/arm64/entry.S
index 4feb1c7..96a69a0 100644
--- a/hypervisor/arch/arm64/entry.S
+++ b/hypervisor/arch/arm64/entry.S
@@ -16,6 +16,9 @@
#include <asm/percpu.h>
#include <asm/jailhouse_hypercall.h>

+#define LINUX_HVC_GET_VECTORS 0
+#define LINUX_HVC_SET_VECTORS 1
+
/* Entry point for Linux loader module on JAILHOUSE_ENABLE */
.text
.globl arch_entry
@@ -54,12 +57,13 @@ arch_entry:
*/

/* keep the linux stub EL2 vectors for later */
- mov x0, xzr
+ mov x0, #LINUX_HVC_GET_VECTORS
hvc #0
mov x16, x0

/* install bootstrap_vectors */
- ldr x0, =bootstrap_vectors
+ mov x0, #LINUX_HVC_SET_VECTORS
+ ldr x1, =bootstrap_vectors
hvc #0
hvc #0 /* bootstrap vectors enter EL2 at el2_entry */
b . /* we don't expect to return here */
--
2.1.4

Reply all
Reply to author
Forward
0 new messages