Re: [PATCH 8/8] Documentation: how to configure jailhouse

2016-10-18 Thread Jan Kiszka
On 2016-10-11 17:11, andreas.koe...@st.oth-regensburg.de wrote: > From: Andreas Koelbl > > There is no documentation on how to configure jailhouse for a specific > platform. A documentation describing all available 'config.h' parameters > is created. > >

Re: [PATCH 0/8] Uart and configuration changes

2016-10-18 Thread Jan Kiszka
On 2016-10-11 17:11, andreas.koe...@st.oth-regensburg.de wrote: > From: Andreas Koelbl > > These are mostly cleanups for uart, configuration changes and a documentation. > Key changes: > > - Move configuraton to project root > - Opt-in for hypervisor output (CONFIG_DEBUG_OUTPUT) > (Note:

Re: [PATCH 7/8] Use a stub of dbg-write.o and uart.o

2016-10-18 Thread Jan Kiszka
On 2016-10-11 17:11, andreas.koe...@st.oth-regensburg.de wrote: > From: Andreas Koelbl > > This smaller interface should be used when no output is needed. > > Signed-off-by: Andreas Koelbl > --- > hypervisor/Makefile

Re: [PATCH 5/8] Move jailhouse configuration to project root

2016-10-18 Thread Jan Kiszka
On 2016-10-11 17:11, andreas.koe...@st.oth-regensburg.de wrote: > From: Andreas Koelbl > > The Jailhouse configuration is currently hidden in > hypervisor/include/jailhouse/config.h, together with config.mk. > config.mk is only needed for the kbuild system,

[PATCH 26/50] arm64: PSCI support for SMP on AArch64

2016-10-18 Thread Jan Kiszka
On AArch64 we pretty much rely on PSCI being present for SMP support (turning multiple cores on and off). This patch implements the helpers needed for SMP and plugs in the PSCI code from AArch32. On AArch64 PSCI calls can be issued via SMC64 as well, contrary to AArch32 which uses SMC32 calls

[PATCH 36/50] inmates: arm64: port inmate demos from AArch32 to AArch64

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis This is a straightforward port of the inmate demos from AArch32 to AArch64. These can now be loaded as cells onto a Foundation ARMv8 model. Signed-off-by: Antonios Motakis [Jan: adjust to CONFIG_ARM_GIC_V2]

[PATCH 23/50] arm64: plug the irqchip and GICv2 code from AArch32

2016-10-18 Thread Jan Kiszka
We plug the irqchip handling code, and the GICv2 implementation from AArch32. arch_handle_sgi and arch_handle_phys_irq are only provided as stubs because they will be replaced with the arm-common versions soon. GICv3 is slightly trickier; it makes heavier use of the sysregs, so we will need to

[PATCH 38/50] config: gic inmate cell config for foundation-v8

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add a cell configuration file for the gic inmate demo, for the foundation-v8 model. Signed-off-by: Antonios Motakis [Jan: adjust include] Signed-off-by: Jan Kiszka ---

[PATCH 44/50] Documentation: add instructions for ARM64 Linux loader

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add a short document describing the use of the Linux loader, used to run Linux inmates on non-root cells on ARM64. Signed-off-by: Antonios Motakis Signed-off-by: Jan Kiszka ---

[PATCH 08/50] arm64: spinlock implementation

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Implement spinlocks for the hypervisor firmware, on AArch64. Signed-off-by: Antonios Motakis [Jan: add missing include] Signed-off-by: Jan Kiszka ---

[PATCH 50/50] arm64: Fix out-of-bounds read access in gic_cpu_reset

2016-10-18 Thread Jan Kiszka
While practically harmless (it's read-only on the stack, and we don't evaluate bits 32..63), Coverity is right in pointing this out. Resolve the issue by using unsigned long for the variable that is passed to test_bit. Remove the unneeded braces from the loop at this chance. Signed-off-by: Jan

[PATCH 01/50] arm: Move modules shared with arm64 into arch/arm-common

2016-10-18 Thread Jan Kiszka
This helps understanding which source modules are shared between arm and the upcoming arm64 architecture. If leaving them in arch/arm, the risk is that changes to arm miss the interdependency with arm64. We may want to do the same for common asm headers in the future. Signed-off-by: Jan Kiszka

[PATCH 16/50] arm64: Implement data cache flush

2016-10-18 Thread Jan Kiszka
The arm_dcaches_flush function is needed early on during initialization, in order to flush the early bootstrap page tables for they hypervisor. Based on patch by Antonios Motakis. Signed-off-by: Jan Kiszka --- hypervisor/arch/arm64/asm-defines.c | 6 +

[PATCH 28/50] arm64: Handle hypercalls from the cells

2016-10-18 Thread Jan Kiszka
Plug in the core handler for hypercalls, so we can start implementing the more interesting stuff. Based on patches by Antonios Motakis Signed-off-by: Jan Kiszka --- hypervisor/arch/arm64/traps.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

[PATCH 04/50] arm64: add asm/processor.h header for AArch64

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add an initial asm/processor.h header for AArch64. This header is similar to the version for AArch32, but e.g. processor modes and exception classes differ. Signed-off-by: Antonios Motakis Signed-off-by: Jan

[PATCH 43/50] config: add linux inmate cell config for AMD Seattle

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add the cell configuration files, and some helper scripts and device tree for the AMD Seattle development board. These can be used to load a linux inmate on a cell on that target. Signed-off-by: Antonios Motakis

[PATCH 30/50] arm64: Implement cell creation/destruction

2016-10-18 Thread Jan Kiszka
This patch implements the functionality needed to create and destroy non-root cells. Signed-off-by: Jan Kiszka --- hypervisor/arch/arm64/control.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git

[PATCH 49/50] ci: Patch the pre-built kernel with __boot_cpu_mode export

2016-10-18 Thread Jan Kiszka
This avoids related warnings in the CI build. Signed-off-by: Jan Kiszka --- ci/gen-kernel-build.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/ci/gen-kernel-build.sh b/ci/gen-kernel-build.sh index bfc3320..a792d6a 100755 ---

[PATCH 15/50] config: root cell configuration for the AMD Seattle

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add the root cell configuration and necessary headers to build and run Jailhouse on the AMD Seattle development board. Signed-off-by: Antonios Motakis [Jan: adjust to new irqchip, platform configuration, perform

[PATCH 13/50] arm64: Provide minimum stubs to allow building on AArch64

2016-10-18 Thread Jan Kiszka
Add the minimum stub functions expected by the rest of the code base to enable building on AArch64. We will implement the missing AArch64 functionality from here or enable the implementations in arm-common. Based on patch by Antonios Motakis. Signed-off-by: Jan Kiszka

[PATCH 14/50] config: add root cell configuration for the ARMv8 Foundation model

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add under config/foundation-v8.c a root cell configuration for the ARMv8 Foundation model, so we can in use this target with Jailhouse. We also add the neccessary parameters in asm/platform.h for this model. Signed-off-by: Antonios Motakis

[PATCH 05/50] arm64: add control.h header file

2016-10-18 Thread Jan Kiszka
From: Dmitry Voytik Add the header file control.h to the AArch64 port of Jailhouse. Signed-off-by: Dmitry Voytik Signed-off-by: Antonios Motakis [antonios.mota...@huawei.com: split off as a separate patch] [Jan:

[PATCH 06/50] arm64: add definitions for the AArch64 page table format

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis The AArch64 page table format is very similar, almost identical to the AArch32 page table format. Add a header file for the AArch64 page table format, based on the AArch32 implementation. AArch64 introduces an extra level of page tables, for a

[PATCH 27/50] arm64: reanimate the root cell back from the dead

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis We have now enough implemented functionality to return to the root cell. We just need to enable guest traps, which will be handled by the MMU, MMIO, and GIC code we already plugged to the port. Finally, we restore the state of the root cell

[PATCH 10/50] arm64: add percpu.h header file

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add the percpu.h header file for the AArch64 implementation. This is the bare bones version of the header needed to compile a stub hypervisor binary on AArch64. A lot of these fields could probably be moved to an arch independent header.

[PATCH 39/50] config: UART demo cell config for the AMD Seattle

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add a cell configuration file for the AMD Seattle development board, to be used with the PL011 UART demo inmate. Signed-off-by: Antonios Motakis [Jan: adjust include] Signed-off-by: Jan Kiszka

[PATCH 33/50] inmates: arm: uart-demo: move heartbeat to header file

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Moving the heartbeat function to a header file, so we can reuse the uart-demo just by reimplementing the heartbeat on AArch64. Signed-off-by: Antonios Motakis Signed-off-by: Jan Kiszka ---

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

2016-10-18 Thread Jan Kiszka
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 ---

[PATCH 18/50] arm64: initialize the hypervisor for entry

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Initialize the hypervisor firmware, so we can finally enter the arch independent entry() function. This includes setting up a stack, and saving the state of the processor before entering the hypervisor. Signed-off-by: Antonios Motakis

[PATCH 32/50] ci: Add support for arm64

2016-10-18 Thread Jan Kiszka
This adds arm64 to CI via the AMD Seattle configuration. Signed-off-by: Jan Kiszka --- .travis.yml |2 +- ci/build-all-configs.sh |6 +- ci/gen-kernel-build.sh |1 + ci/kernel-config-amd-seattle | 3091

[PATCH 46/50] arm64: Add dsb around EL2 TLB flush

2016-10-18 Thread Jan Kiszka
This adds the barriers needed according to ARM DDI 0487A.j, K10.5.3. Without them, frequent crashes can be observed on the Hi6220, e.g. on the first access of the freshly mapped GICD. Signed-off-by: Jan Kiszka --- hypervisor/arch/arm64/include/asm/paging.h | 8 ++--

[PATCH 07/50] arm64: add types.h

2016-10-18 Thread Jan Kiszka
From: Dmitry Voytik Add the asm/types.h header file, which defines the size of the data types. Signed-off-by: Dmitry Voytik Signed-off-by: Jan Kiszka --- hypervisor/arch/arm64/include/asm/types.h | 46

[PATCH 09/50] arm64: implement bitops

2016-10-18 Thread Jan Kiszka
From: Claudio Fontana implement set_bit, clear_bit, test_and_set_bit. test_and_set_bit is used only in the panic_printk apparently, while set_bit and clear_bit are used in page table handling code. Signed-off-by: Claudio Fontana

[PATCH 22/50] arm64: handle accesses to emulated mmio regions

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Catch accesses to the mmio regions that we want to handle from the hypervisor. These are used also by the GIC code. Signed-off-by: Antonios Motakis Signed-off-by: Dmitry Voytik [Jan:

[PATCH 20/50] arm64: dump stack on unhandled exceptions

2016-10-18 Thread Jan Kiszka
From: Dmitry Voytik Dump stack in the following cases: * exception in EL2. We can determine the stack size * unhandled exceptions in EL1/0. We can't determine the stack size thus we just print 512 bytes. For EL2 exceptions the debug output will be like this:

[PATCH 31/50] tools: arm64: add exception dump parser

2016-10-18 Thread Jan Kiszka
From: Dmitry Voytik Add ./scripts/arm64-parsedump.py tool. This tool decodes an ARM64 exception dump and prints human-readable stack trace like this: [0xfc008688] arch_handle_dabt mmio.c:97 [0xfc009acc] arch_handle_trap traps.c:143 The tool can read

[PATCH 40/50] config: gic demo cell config for the AMD Seattle

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add a cell configuration file to use on the AMD Seattle, to be used with the gic demo inmate. Signed-off-by: Antonios Motakis [Jan: adjust include] Signed-off-by: Jan Kiszka ---

[PATCH 02/50] arm: Factor out common control.c module

2016-10-18 Thread Jan Kiszka
Many functions will be shared with arm64. This creates one new inter-module interface: arm_cpu_reset. It now takes the desires PC after reset as parameter, instead of overwriting the related register if cpu_on_entry is not the final value. Signed-off-by: Jan Kiszka ---

[PATCH 48/50] ci: Add aarch64 gcc to Coverity setup

2016-10-18 Thread Jan Kiszka
This enables the analysis of arm64 builds by Coverity. Signed-off-by: Jan Kiszka --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6eafd5e..4e723dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,6

[PATCH 12/50] arm64: add jailhouse_hypercall.h header file

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add the jailhouse_hypercall.h header file for AArch64. We will need this also from the Linux side, in order to load Jailhouse in memory and to issue hypercalls to an already loaded instance of the hypervisor. Signed-off-by: Antonios Motakis

[PATCH 47/50] configs, inmates: Add support for HiKey board

2016-10-18 Thread Jan Kiszka
This adds the configs for inmate mach headers for the LeMaker HiKey board, 2GB edition. Configuration is rather permissive, should be fine-tuned later on. Signed-off-by: Jan Kiszka --- configs/hikey-gic-demo.c | 55 +++

[PATCH 37/50] config: add uart demo cell config for Foundation v8

2016-10-18 Thread Jan Kiszka
From: Antonios Motakis Add a cell configuration file for the foundation-v8 model, to be used with the PL011 UART inmate demo. Signed-off-by: Antonios Motakis [Jan: adjust include] Signed-off-by: Jan Kiszka ---

[siemens/jailhouse] 635a05: ci: Add aarch64 gcc to Coverity setup

2016-10-18 Thread GitHub
Branch: refs/heads/next Home: https://github.com/siemens/jailhouse Commit: 635a05c4044a9f4508971e1eeaa5e91b8842eb37 https://github.com/siemens/jailhouse/commit/635a05c4044a9f4508971e1eeaa5e91b8842eb37 Author: Jan Kiszka Date: 2016-10-18 (Tue, 18 Oct

[siemens/jailhouse] dbb4f6: ci: Patch the pre-built kernel with __boot_cpu_mod...

2016-10-18 Thread GitHub
Branch: refs/heads/coverity_scan Home: https://github.com/siemens/jailhouse Commit: dbb4f6c3c219fdd2c64045b9c5295da88fa35598 https://github.com/siemens/jailhouse/commit/dbb4f6c3c219fdd2c64045b9c5295da88fa35598 Author: Jan Kiszka Date: 2016-10-18 (Tue,