]> rtime.felk.cvut.cz Git - jailhouse.git/commit
driver: ioremap the hypervisor firmware to any kernel address
authorAntonios Motakis <antonios.motakis@huawei.com>
Fri, 17 Jun 2016 12:37:29 +0000 (14:37 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sun, 26 Jun 2016 07:16:27 +0000 (09:16 +0200)
commiteda93050c75d3f3ef4509d3faccc451b0946b607
treeede453c17bde88d23456b31eaf0e98fee3a75e6b
parent7287a5a75cab2e0075c1d997b727ab740f81db5a
driver: ioremap the hypervisor firmware to any kernel address

At the moment the Linux driver maps the Jailhouse binary to
JAILHOUSE_BASE. The underlying assumption is that Linux may map the
firmware (in the Linux kernel space), to the same virtual address it
has been built to run from.

This assumption is unworkable on ARMv8 processors running in AArch64
mode. Kernel memory is allocated in a high address region, that is
not addressable from EL2, where the hypervisor will run from.

This patch removes the assumption, by introducing the
JAILHOUSE_BORROW_ROOT_PT define, which signals the behavior of the
current architectures.

We also turn the entry point in the header, into an offset from the
Jailhouse load address, so we can enter the image regardless of
where it  will be mapped.

Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
driver/main.c
hypervisor/arch/arm/include/asm/jailhouse_hypercall.h
hypervisor/arch/x86/include/asm/jailhouse_hypercall.h
hypervisor/setup.c