[PATCH 06/25] x86: Add support for 8-bit MMIO 1-byte distance UART

143 views
Skip to first unread message

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
Required for the Denverton SoC.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
hypervisor/arch/x86/dbg-write.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/hypervisor/arch/x86/dbg-write.c b/hypervisor/arch/x86/dbg-write.c
index af2c7083..48948972 100644
--- a/hypervisor/arch/x86/dbg-write.c
+++ b/hypervisor/arch/x86/dbg-write.c
@@ -28,6 +28,16 @@ static u32 reg_in_pio(struct uart_chip *chip, unsigned int reg)
return inb((u16)(unsigned long long)chip->virt_base + reg);
}

+static void reg_out_mmio8(struct uart_chip *chip, unsigned int reg, u32 value)
+{
+ mmio_write8(chip->virt_base + reg, value);
+}
+
+static u32 reg_in_mmio8(struct uart_chip *chip, unsigned int reg)
+{
+ return mmio_read8(chip->virt_base + reg);
+}
+
void arch_dbg_write_init(void)
{
const u32 flags = system_config->debug_console.flags;
@@ -39,6 +49,10 @@ void arch_dbg_write_init(void)
uart->debug_console = &system_config->debug_console;
if (CON1_IS_MMIO(flags)) {
uart->virt_base = hypervisor_header.debug_console_base;
+ if (CON1_USES_REGDIST_1(flags)) {
+ uart->reg_out = reg_out_mmio8;
+ uart->reg_in = reg_in_mmio8;
+ }
} else {
uart->virt_base =
(void *)system_config->debug_console.address;
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
Adjust markdown formatting, avoiding ugly ``` where possible via
indention, ensuring proper monospace formatting of the JAILHOUSE_CON1
constants.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Documentation/debug-output.md | 98 +++++++++++++++++++++----------------------
1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/Documentation/debug-output.md b/Documentation/debug-output.md
index b75129df..fc7198ef 100644
--- a/Documentation/debug-output.md
+++ b/Documentation/debug-output.md
@@ -12,26 +12,31 @@ options.
### .flags
All architectures support the empty debug output driver, which is selected by
default if nothing else is chosen:
- - JAILHOUSE_CON1_TYPE_NONE
+
+ - JAILHOUSE_CON1_TYPE_NONE

Possible debug outputs for x86:
- - JAILHOUSE_CON1_TYPE_8250 /* 8250-compatible UART (PIO or MMIO) */
- - JAILHOUSE_CON1_TYPE_VGA /* VGA console */
+
+ - JAILHOUSE_CON1_TYPE_8250 /* 8250-compatible UART (PIO or MMIO) */
+ - JAILHOUSE_CON1_TYPE_VGA /* VGA console */

VGA output is only available for x86. For further documentation on VGA output
see [vga-console.txt](vga-console.txt).

Possible debug outputs for arm and arm64:
- - JAILHOUSE_CON1_TYPE_8250 /* 8250 compatible UART*/
- - JAILHOUSE_CON1_TYPE_PL011 /* AMBA PL011 UART */
+
+ - JAILHOUSE_CON1_TYPE_8250 /* 8250 compatible UART*/
+ - JAILHOUSE_CON1_TYPE_PL011 /* AMBA PL011 UART */

Possible access modes, to be or'ed:
- - JAILHOUSE_CON1_ACCESS_PIO /* PIO, x86 only */
- - JAILHOUSE_CON1_ACCESS_MMIO /* MMIO, x86 and ARM */
+
+ - JAILHOUSE_CON1_ACCESS_PIO /* PIO, x86 only */
+ - JAILHOUSE_CON1_ACCESS_MMIO /* MMIO, x86 and ARM */

Possible register distances (MMIO only, PIO is implicitly 1-byte), to be or'ed:
- - JAILHOUSE_CON1_REGDIST_1 /* 1-byte distance, x86 only */
- - JAILHOUSE_CON1_REGDIST_4 /* 4-bytes distance, x86 and ARM */
+
+ - JAILHOUSE_CON1_REGDIST_1 /* 1-byte distance, x86 only */
+ - JAILHOUSE_CON1_REGDIST_4 /* 4-bytes distance, x86 and ARM */

### .address and .size
The address member denotes the base address of the Debug console (PIO or MMIO
@@ -58,34 +63,32 @@ Both default to 0.

### Examples
Example configuration for PIO based debug output on x86:
-```
-.debug_console = {
- .address = 0x3f8, /* PIO address */
- .divider = 0x1, /* 115200 Baud */
- .flags = JAILHOUSE_CON1_TYPE_8250 | /* choose the 8250 driver */
- JAILHOUSE_CON1_FLAG_PIO, /* use PIO instead of MMIO */
-},
-```
+
+ .debug_console = {
+ .address = 0x3f8, /* PIO address */
+ .divider = 0x1, /* 115200 Baud */
+ .flags = JAILHOUSE_CON1_TYPE_8250 | /* choose the 8250 driver */
+ JAILHOUSE_CON1_PIO, /* chose PIO register access */
+ },

Example configuration for MMIO based debug output on ARM (8250 UART):
-```
-.debug_console = {
- .address = 0x70006300, /* MMIO base address */
- .size = 0x40, /* size */
- .clock_reg = 0x60006000 + 0x330, /* Optional: Debug Clock Register */
- .gate_nr = (65 % 32), /* Optional: Debug Clock Gate Nr */
- .divider = 0xdd, /* 115200 */
- .flags = JAILHOUSE_CON1_TYPE_8250 | /* choose the 8250 driver */
- JAILHOUSE_CON1_FLAG_MMIO, /* choose MMIO register access */
-},
-```
+
+ .debug_console = {
+ .address = 0x70006300, /* MMIO base address */
+ .size = 0x40, /* size */
+ .clock_reg = 0x60006000 + 0x330, /* Optional: Debug Clock Register */
+ .gate_nr = (65 % 32), /* Optional: Debug Clock Gate Nr */
+ .divider = 0xdd, /* 115200 */
+ .flags = JAILHOUSE_CON1_TYPE_8250 | /* choose the 8250 driver */
+ JAILHOUSE_CON1_MMIO_32, /* choose 32-bit MMIO access */
+ },

Example configuration for disabled debug output (architecture independent):
-```
-.debug_console = {
- .flags = JAILHOUSE_CON1_TYPE_NONE,
-}
-```
+
+ .debug_console = {
+ .flags = JAILHOUSE_CON1_TYPE_NONE,
+ }
+

Hypervisor Console via sysfs
----------------------------
@@ -96,9 +99,9 @@ set, the hypervisor console is available through
is available through /dev/jailhouse.

Example
-```
-cat /dev/jailhouse
-```
+
+ cat /dev/jailhouse
+

Inmates
-------
@@ -131,24 +134,21 @@ initialisation of the UART interface.

con-clock-reg and con-gate-nr are currently only available on ARM 8250.

-On X86, VGA output is not available for inmates.
+On x86, VGA output is not available for inmates.

### Examples
Example command line parameters for PIO based debug output on x86, where the
inmate will initialise UART:
-```
- jailhouse cell load foocell inmate.bin -a 0xf0000 \
- -s "con-base=0x3f8 con-divider=1" -a 0xf0000
-```
+
+ jailhouse cell load foocell inmate.bin -a 0xf0000 \
+ -s "con-base=0x3f8 con-divider=1" -a 0xf0000

Example configuration for MMIO based debug output on ARM using the 8250 driver:
-```
- jailhouse cell load foocell inmate.bin -a 0x0 \
- -s "con-type=8250 con-base=0x70006000 con-divider=0xdd" -a 0x100
-```
+
+ jailhouse cell load foocell inmate.bin -a 0x0 \
+ -s "con-type=8250 con-base=0x70006000 con-divider=0xdd" -a 0x100

Example configuration for MMIO based debug output on ARM64 using the PL011 driver:
-```
- jailhouse cell load foocell inmate.bin -a 0x0 \
- -s "con-type=PL011 con-base=0xf7113000" -a 0x1000
-```
+
+ jailhouse cell load foocell inmate.bin -a 0x0 \
+ -s "con-type=PL011 con-base=0xf7113000" -a 0x1000
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

Move it up one level so the hypervisor core can make use of it
itself.

Signed-off-by: Henning Schild <henning...@siemens.com>
Tested-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
[Jan: do not generate if cleaning up, rename vars, fix dependencies]
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Kbuild | 45 +++++++++++++++++++++++++++++++++------
driver/Makefile | 2 +-
hypervisor/Makefile | 33 +++++-----------------------
hypervisor/arch/arm-common/Kbuild | 4 ++--
4 files changed, 47 insertions(+), 37 deletions(-)

diff --git a/Kbuild b/Kbuild
index 66bf3158..01cf03d1 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1,7 +1,7 @@
#
# Jailhouse, a Linux-based partitioning hypervisor
#
-# Copyright (c) Siemens AG, 2013-2015
+# Copyright (c) Siemens AG, 2013-2017
#
# Authors:
# Jan Kiszka <jan.k...@siemens.com>
@@ -11,12 +11,45 @@
# the COPYING file in the top-level directory.
#

+define filechk_config_mk
+( \
+ echo "\$$(foreach config,\$$(filter CONFIG_%, \
+ \$$(.VARIABLES)), \$$(eval undefine \$$(config)))"; \
+ if [ -f $(src)/hypervisor/include/jailhouse/config.h ]; then \
+ sed -e "/^#define \([^[:space:]]*\)[[:space:]]*1/!d" \
+ -e "s/^#define \([^[:space:]]*\)[[:space:]]*1/\1=y/"\
+ $(src)/hypervisor/include/jailhouse/config.h; \
+ fi \
+)
+endef
+
+GEN_CONFIG_MK := $(obj)/hypervisor/include/generated/config.mk
+export GEN_CONFIG_MK
+
+$(GEN_CONFIG_MK): $(src)/Makefile FORCE
+ $(call filechk,config_mk)
+
+define filechk_version
+ $(src)/scripts/gen_version_h $(src)/
+endef
+
+GEN_VERSION_H := $(obj)/hypervisor/include/generated/version.h
+export GEN_VERSION_H
+
+$(GEN_VERSION_H): $(src)/Makefile FORCE
+ $(call filechk,version)
+
+# Do not generate files by creating dependencies if we are cleaning up
+ifeq ($(filter %/Makefile.clean,$(MAKEFILE_LIST)),)
+
+$(obj)/hypervisor $(obj)/inmates: $(GEN_CONFIG_MK)
+
+$(obj)/driver $(obj)/hypervisor: $(GEN_VERSION_H)
+
+endif
+
subdir-y := driver hypervisor configs inmates tools

subdir-ccflags-y := -Werror

-# inmates build depends on generated config.mk of the hypervisor,
-# and the driver needs version.h from there
-$(obj)/inmates $(obj)/driver: $(obj)/hypervisor
-
-clean-dirs := Documentation/generated
+clean-dirs := Documentation/generated hypervisor/include/generated
diff --git a/driver/Makefile b/driver/Makefile
index 6b7e9869..8260fd98 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -20,7 +20,7 @@ jailhouse-y := cell.o main.o sysfs.o
jailhouse-$(CONFIG_PCI) += pci.o
jailhouse-$(CONFIG_OF) += vpci_template.dtb.o

-$(obj)/main.o: $(obj)/../hypervisor/include/generated/version.h
+$(obj)/main.o: $(GEN_VERSION_H)

targets += vpci_template.dtb vpci_template.dtb.S

diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index d246dac5..15956017 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -1,7 +1,7 @@
#
# Jailhouse, a Linux-based partitioning hypervisor
#
-# Copyright (c) Siemens AG, 2013-2016
+# Copyright (c) Siemens AG, 2013-2017
# Copyright (c) Valentine Sinitsyn, 2014
#
# Authors:
@@ -35,26 +35,7 @@ GCOV_PROFILE := n
CORE_OBJECTS = setup.o printk.o paging.o control.o lib.o mmio.o pci.o ivshmem.o
CORE_OBJECTS += uart.o uart-8250.o

-define filechk_config_mk
-( \
- echo "\$$(foreach config,\$$(filter CONFIG_%, \
- \$$(.VARIABLES)), \$$(eval undefine \$$(config)))"; \
- if [ -f $(src)/include/jailhouse/config.h ]; then \
- sed -e "/^#define \([^[:space:]]*\)[[:space:]]*1/!d" \
- -e "s/^#define \([^[:space:]]*\)[[:space:]]*1/\1=y/" \
- $(src)/include/jailhouse/config.h; \
- fi \
-)
-endef
-
-$(obj)/include/generated/config.mk: Makefile FORCE
- $(call filechk,config_mk)
-
-define filechk_version
- $(src)/../scripts/gen_version_h $(src)/..
-endef
-
-clean-dirs := include/generated arch/$(SRCARCH)/include/generated
+clean-dirs := arch/$(SRCARCH)/include/generated

define sed-y
"/^=>/{s:=>#\(.*\):/* \1 */:; \
@@ -91,17 +72,13 @@ $(obj)/$(defines-file): $(obj)/arch/$(SRCARCH)/asm-defines.s
$(Q)mkdir -p $(dir $@)
$(call cmd,defines)

-$(obj)/include/generated/version.h: $(src)/Makefile FORCE
- $(call filechk,version)
-
$(foreach co,$(CORE_OBJECTS),\
$(eval $(obj)/$(co): $(obj)/$(defines-file)))

-$(obj)/setup.o: $(obj)/include/generated/version.h
+$(obj)/setup.o: $(GEN_VERSION_H)

-arch-builtin: $(obj)/$(defines-file) $(obj)/include/generated/config.mk FORCE
- $(Q)$(MAKE) $(build)=$(obj)/arch/$(SRCARCH) \
- CONFIG_MK=$(obj)/include/generated/config.mk
+arch-builtin: $(obj)/$(defines-file) FORCE
+ $(Q)$(MAKE) $(build)=$(obj)/arch/$(SRCARCH)

always :=

diff --git a/hypervisor/arch/arm-common/Kbuild b/hypervisor/arch/arm-common/Kbuild
index 66d40fa5..fe552c20 100644
--- a/hypervisor/arch/arm-common/Kbuild
+++ b/hypervisor/arch/arm-common/Kbuild
@@ -1,7 +1,7 @@
#
# Jailhouse, a Linux-based partitioning hypervisor
#
-# Copyright (c) Siemens AG, 2013-2016
+# Copyright (c) Siemens AG, 2013-2017
#
# Authors:
# Jan Kiszka <jan.k...@siemens.com>
@@ -10,7 +10,7 @@
# the COPYING file in the top-level directory.
#

-include $(CONFIG_MK)
+include $(GEN_CONFIG_MK)

GCOV_PROFILE := n

--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

Move it out to a header that can be included by a tool, without
pulling in too many hypervisor internals.
That will be used by the gcov tool so we do not need to include
the value in the hypervisor binary.

Signed-off-by: Henning Schild <henning...@siemens.com>
Tested-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
hypervisor/arch/arm/include/asm/jailhouse_header.h | 13 +++++++++++++
hypervisor/arch/arm/include/asm/jailhouse_hypercall.h | 3 +--
hypervisor/arch/arm64/include/asm/jailhouse_header.h | 13 +++++++++++++
hypervisor/arch/x86/include/asm/jailhouse_header.h | 19 +++++++++++++++++++
hypervisor/arch/x86/include/asm/jailhouse_hypercall.h | 13 +------------
hypervisor/hypervisor.lds.S | 4 ++--
hypervisor/include/jailhouse/header.h | 4 +++-
7 files changed, 52 insertions(+), 17 deletions(-)
create mode 100644 hypervisor/arch/arm/include/asm/jailhouse_header.h
create mode 100644 hypervisor/arch/arm64/include/asm/jailhouse_header.h
create mode 100644 hypervisor/arch/x86/include/asm/jailhouse_header.h

diff --git a/hypervisor/arch/arm/include/asm/jailhouse_header.h b/hypervisor/arch/arm/include/asm/jailhouse_header.h
new file mode 100644
index 00000000..9a016409
--- /dev/null
+++ b/hypervisor/arch/arm/include/asm/jailhouse_header.h
@@ -0,0 +1,13 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (C) Siemens AG, 2017
+ *
+ * Authors:
+ * Henning Schild <henning...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#define JAILHOUSE_BASE 0xf0000000
diff --git a/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h b/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h
index ddc42d02..fac8e2df 100644
--- a/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h
+++ b/hypervisor/arch/arm/include/asm/jailhouse_hypercall.h
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013-2015
+ * Copyright (c) Siemens AG, 2013-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -36,7 +36,6 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

-#define JAILHOUSE_BASE 0xf0000000
#define JAILHOUSE_BORROW_ROOT_PT 1

#define JAILHOUSE_CALL_INS ".arch_extension virt\n\t" \
diff --git a/hypervisor/arch/arm64/include/asm/jailhouse_header.h b/hypervisor/arch/arm64/include/asm/jailhouse_header.h
new file mode 100644
index 00000000..d4e95902
--- /dev/null
+++ b/hypervisor/arch/arm64/include/asm/jailhouse_header.h
@@ -0,0 +1,13 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (C) Siemens AG, 2017
+ *
+ * Authors:
+ * Henning Schild <henning...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#define JAILHOUSE_BASE 0xffffc0200000
diff --git a/hypervisor/arch/x86/include/asm/jailhouse_header.h b/hypervisor/arch/x86/include/asm/jailhouse_header.h
new file mode 100644
index 00000000..38b44501
--- /dev/null
+++ b/hypervisor/arch/x86/include/asm/jailhouse_header.h
@@ -0,0 +1,19 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (C) Siemens AG, 2017
+ *
+ * Authors:
+ * Henning Schild <henning...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#ifdef __ASSEMBLY__
+#define __MAKE_UL(x) x
+#else /* !__ASSEMBLY__ */
+#define __MAKE_UL(x) x ## UL
+#endif
+
+#define JAILHOUSE_BASE __MAKE_UL(0xfffffffff0000000)
diff --git a/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h b/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h
index 90b8cb72..ee977324 100644
--- a/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h
+++ b/hypervisor/arch/x86/include/asm/jailhouse_hypercall.h
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013-2015
+ * Copyright (c) Siemens AG, 2013-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -36,7 +36,6 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

-#define JAILHOUSE_BASE __MAKE_UL(0xfffffffff0000000)
#define JAILHOUSE_BORROW_ROOT_PT 1

/*
@@ -71,14 +70,6 @@
#define JAILHOUSE_CPUID_SIGNATURE 0x40000000
#define JAILHOUSE_CPUID_FEATURES 0x40000001

-#ifdef __ASSEMBLY__
-
-#define __MAKE_UL(x) x
-
-#else /* !__ASSEMBLY__ */
-
-#define __MAKE_UL(x) x ## UL
-
/**
* @defgroup Hypercalls Hypercall Subsystem
*
@@ -203,5 +194,3 @@ jailhouse_send_reply_from_cell(struct jailhouse_comm_region *comm_region,
}

/** @} **/
-
-#endif /* !__ASSEMBLY__ */
diff --git a/hypervisor/hypervisor.lds.S b/hypervisor/hypervisor.lds.S
index b0154b5a..a00f1aa4 100644
--- a/hypervisor/hypervisor.lds.S
+++ b/hypervisor/hypervisor.lds.S
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013
+ * Copyright (c) Siemens AG, 2013-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -13,7 +13,7 @@
#include <asm/paging.h>
#include <asm/sections.h>

-#include <asm/jailhouse_hypercall.h>
+#include <asm/jailhouse_header.h>

SECTIONS
{
diff --git a/hypervisor/include/jailhouse/header.h b/hypervisor/include/jailhouse/header.h
index d1f1508b..e31cba43 100644
--- a/hypervisor/include/jailhouse/header.h
+++ b/hypervisor/include/jailhouse/header.h
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013
+ * Copyright (c) Siemens AG, 2013-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -10,6 +10,8 @@
* the COPYING file in the top-level directory.
*/

+#include <asm/jailhouse_header.h>
+
#define JAILHOUSE_SIGNATURE "JAILHOUS"

/**
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

With the new feature to download the used firmware out of sysfs and
a way to get GCOV data into that. It is now time to extract this
information and generate .gcda files for higher level tools to work
with.
Instead of dealing with the details of that just use what the
compiler gives us when we link to its gcov lib.

Signed-off-by: Henning Schild <henning...@siemens.com>
[Jan: clean .gcda files, fix usage of error(),
fix signed/unsigned comparison]
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
.gitignore | 2 +
hypervisor/Makefile | 1 +
tools/Makefile | 14 ++-
tools/jailhouse-gcov-extract.c | 222 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 238 insertions(+), 1 deletion(-)
create mode 100644 tools/jailhouse-gcov-extract.c

diff --git a/.gitignore b/.gitignore
index 839219ee..727eee34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
*.cmd
*.bin
*.gcno
+*.gcda
.tmp_versions
*.dtb
*.dtb.S
@@ -14,6 +15,7 @@ driver/jailhouse.ko
hypervisor/include/jailhouse/config.h
hypervisor/hypervisor.lds
tools/jailhouse
+tools/jailhouse-gcov-extract
tools/jailhouse-config-collect
configs/*.cell
Documentation/generated
diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 0f3c7bcb..279c4c4e 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -41,6 +41,7 @@ ifdef CONFIG_JAILHOUSE_GCOV
CORE_OBJECTS += gcov.o
endif
ccflags-$(CONFIG_JAILHOUSE_GCOV) += -fprofile-arcs -ftest-coverage
+clean-files += *.gcda arch/*/.*.gcda

clean-dirs := arch/$(SRCARCH)/include/generated

diff --git a/tools/Makefile b/tools/Makefile
index 23c2b3c7..0210dc18 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,7 +1,7 @@
#
# Jailhouse, a Linux-based partitioning hypervisor
#
-# Copyright (c) Siemens AG, 2013-2016
+# Copyright (c) Siemens AG, 2013-2017
#
# Authors:
# Jan Kiszka <jan.k...@siemens.com>
@@ -23,6 +23,7 @@ LDFLAGS :=
GCOV_PROFILE := n

BINARIES := jailhouse
+
HELPERS := \
jailhouse-cell-linux \
jailhouse-cell-stats \
@@ -58,6 +59,17 @@ targets += jailhouse.o
$(obj)/jailhouse: $(obj)/jailhouse.o
$(call if_changed,ld)

+CFLAGS_jailhouse-gcov-extract.o := -I$(src)/../hypervisor/include \
+ -I$(src)/../hypervisor/arch/$(SRCARCH)/include
+# just change ldflags not cflags, we are not profiling the tool
+LDFLAGS_jailhouse-gcov-extract := -lgcov -fprofile-arcs
+
+targets += jailhouse-gcov-extract.o
+always += jailhouse-gcov-extract
+
+$(obj)/jailhouse-gcov-extract: $(obj)/jailhouse-gcov-extract.o
+ $(call if_changed,ld)
+
$(obj)/jailhouse-config-collect: $(src)/jailhouse-config-create $(src)/jailhouse-config-collect.tmpl
$(call if_changed,gen_collect)

diff --git a/tools/jailhouse-gcov-extract.c b/tools/jailhouse-gcov-extract.c
new file mode 100644
index 00000000..3c25d63e
--- /dev/null
+++ b/tools/jailhouse-gcov-extract.c
@@ -0,0 +1,222 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2017
+ *
+ * Authors:
+ * Henning Schild <henning...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <error.h>
+#include <unistd.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <jailhouse/header.h>
+#include <asm/jailhouse_header.h>
+
+#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
+#error "Gcov format of gcc < 4.7 is not supported!"
+#endif
+
+#ifdef __ARM_EABI__
+#define BITS_PER_LONG 32
+#else
+#define BITS_PER_LONG 64
+#endif
+/*
+ * the following bits are heavily inspired by linux/kernel/gcov/gcc_4.7.c
+ * with some slight modification
+ */
+#if BITS_PER_LONG >= 64
+typedef long gcov_type;
+#else
+typedef long long gcov_type;
+#endif
+
+#if (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
+#define GCOV_COUNTERS 10
+#elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
+#define GCOV_COUNTERS 9
+#else
+#define GCOV_COUNTERS 8
+#endif
+
+struct gcov_ctr_info {
+ unsigned int num;
+ gcov_type *values;
+};
+
+struct gcov_fn_info {
+ struct gcov_info *key;
+ unsigned int ident;
+ unsigned int lineno_checksum;
+ unsigned int cfg_checksum;
+ struct gcov_ctr_info ctrs[0];
+};
+
+struct gcov_info {
+ unsigned int version;
+ struct gcov_info *next;
+ unsigned int stamp;
+ char *filename;
+ void (*merge[GCOV_COUNTERS])(gcov_type *, unsigned int);
+ unsigned int n_functions;
+ struct gcov_fn_info **functions;
+};
+/*
+ * end of linux/kernel/gcov/gcc_4.7.c
+ */
+
+static void *hypervisor;
+static ssize_t hypervisor_size;
+extern void __gcov_merge_add(gcov_type *counters, unsigned int n_counters);
+extern void __gcov_init(struct gcov_info *);
+extern void __gcov_dump();
+
+static void *hypervisor2current(void *hvp)
+{
+ unsigned long hvaddr = (unsigned long)hvp;
+ void *ret;
+
+ if (hvp == NULL)
+ return NULL;
+ assert(hvaddr >= JAILHOUSE_BASE &&
+ hvaddr < JAILHOUSE_BASE + (unsigned long)hypervisor_size);
+ ret = (void *)(hvaddr - JAILHOUSE_BASE + (unsigned long)hypervisor);
+
+ return ret;
+}
+
+/*
+ * translate one gcov-"tree" from the hypervisor address space to the current
+ * addresses
+ */
+static void translate_all_pointers(struct gcov_info *info)
+{
+ struct gcov_fn_info *fn_info;
+ struct gcov_ctr_info *ctr_info;
+ unsigned int i, j, active;
+
+ info->next = hypervisor2current(info->next);
+ info->filename = hypervisor2current(info->filename);
+ active = 0;
+ for (i = 0; i < GCOV_COUNTERS; i++) {
+ if (info->merge[i]) {
+ active++;
+ info->merge[i] = &__gcov_merge_add;
+ } else
+ break;
+ }
+ info->functions = hypervisor2current(info->functions);
+ for (i = 0; i < info->n_functions; i++) {
+ info->functions[i] = hypervisor2current(info->functions[i]);
+ fn_info = info->functions[i];
+ if (fn_info) {
+ fn_info->key = hypervisor2current(fn_info->key);
+ assert(fn_info->key == info);
+ for (j = 0; j < active; j++) {
+ ctr_info = fn_info->ctrs + j;
+ ctr_info->values =
+ hypervisor2current(ctr_info->values);
+ }
+ }
+ }
+}
+
+int main(int argc, char **argv)
+{
+ struct gcov_info *gcov_info_head, *info, *next;
+ struct jailhouse_header *header;
+ struct stat sbuf;
+ char *filename;
+ char *errstr = NULL;
+ ssize_t count, ret;
+ int fd;
+
+ if (argc == 1) {
+ filename = "/sys/devices/jailhouse/core";
+ } else {
+ if (argc != 2 || (strncmp(argv[1], "-", 1) == 0)) {
+ printf("Usage: %s [-h] [FILE]\n", argv[0]);
+ if (strcmp(argv[1], "-h")) {
+ errno = EINVAL;
+ errstr = argv[1];
+ }
+ goto out;
+ }
+ filename = argv[1];
+ }
+ fd = open(filename, O_RDONLY);
+ if (fd < 1) {
+ errstr = filename;
+ goto out;
+ }
+
+ ret = fstat(fd, &sbuf);
+ if (ret) {
+ errstr = filename;
+ goto out;
+ }
+ hypervisor_size = sbuf.st_size;
+ hypervisor = malloc(hypervisor_size);
+ if (hypervisor == NULL) {
+ errstr = "malloc";
+ goto out_f;
+ }
+
+ count = 0;
+ while (count < hypervisor_size) {
+ ret = read(fd, hypervisor + count, hypervisor_size-count);
+ if (ret < 0 && errno != EINTR) {
+ errstr = "read";
+ goto out_m;
+ }
+ count += ret;
+ }
+ assert(count == hypervisor_size);
+
+ header = (struct jailhouse_header *)hypervisor;
+ if (strcmp(header->signature, JAILHOUSE_SIGNATURE)) {
+ errno = EINVAL;
+ error(0, 0, "%s does not seem to be a hypervisor image",
+ filename);
+ goto out_m;
+ }
+
+ gcov_info_head = hypervisor2current(header->gcov_info_head);
+ if (!gcov_info_head) {
+ errno = EINVAL;
+ error(0, 0, "%s does not contain gcov information.", filename);
+ goto out_m;
+ }
+ info = gcov_info_head;
+ for (info = gcov_info_head; info; info = info->next)
+ translate_all_pointers(info);
+
+ for (info = gcov_info_head; info;) {
+ /* remember next because __gcov_init changes it */
+ next = info->next;
+ __gcov_init(info);
+ info = next;
+ }
+ __gcov_dump();
+
+out_m:
+ free(hypervisor);
+out_f:
+ close(fd);
+out:
+ if (errno && errstr)
+ error(errno, errno, "%s", errstr);
+ return 0;
+}
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
As we already have to provide callbacks for the different access modes,
there is nothing to gain by encoding the register distance via a
separate field - which then has to be patched in addition to the
callbacks. We can simply fold this parameter into the implementation of
the callbacks.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
hypervisor/arch/x86/dbg-write.c | 16 ++++++++--------
hypervisor/include/jailhouse/uart.h | 5 ++---
hypervisor/uart-8250.c | 28 ++++++++++++++--------------
3 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/hypervisor/arch/x86/dbg-write.c b/hypervisor/arch/x86/dbg-write.c
index 7b586313..af2c7083 100644
--- a/hypervisor/arch/x86/dbg-write.c
+++ b/hypervisor/arch/x86/dbg-write.c
@@ -18,14 +18,14 @@
#include <asm/io.h>
#include <asm/vga.h>

-static void uart_pio_out(void *address, u32 value)
+static void reg_out_pio(struct uart_chip *chip, unsigned int reg, u32 value)
{
- outb(value, (u16)(unsigned long long)address);
+ outb(value, (u16)(unsigned long long)chip->virt_base + reg);
}

-static u32 uart_pio_in(void *address)
+static u32 reg_in_pio(struct uart_chip *chip, unsigned int reg)
{
- return inb((u16)(unsigned long long)address);
+ return inb((u16)(unsigned long long)chip->virt_base + reg);
}

void arch_dbg_write_init(void)
@@ -40,10 +40,10 @@ void arch_dbg_write_init(void)
if (CON1_IS_MMIO(flags)) {
uart->virt_base = hypervisor_header.debug_console_base;
} else {
- uart->virt_base = (void*)system_config->debug_console.address;
- uart->reg_out = uart_pio_out;
- uart->reg_in = uart_pio_in;
- uart->reg_dist = 1;
+ uart->virt_base =
+ (void *)system_config->debug_console.address;
+ uart->reg_out = reg_out_pio;
+ uart->reg_in = reg_in_pio;
}
uart->init(uart);
arch_dbg_write = uart_write;
diff --git a/hypervisor/include/jailhouse/uart.h b/hypervisor/include/jailhouse/uart.h
index a2e51bbf..7d9a7c32 100644
--- a/hypervisor/include/jailhouse/uart.h
+++ b/hypervisor/include/jailhouse/uart.h
@@ -17,9 +17,8 @@ struct uart_chip {
struct jailhouse_debug_console *debug_console;

/* driver selects defaults, if used */
- void (*reg_out)(void *address, u32 value);
- u32 (*reg_in)(void *address);
- unsigned int reg_dist;
+ void (*reg_out)(struct uart_chip *chip, unsigned int reg, u32 value);
+ u32 (*reg_in)(struct uart_chip *chip, unsigned int reg);

/* set by the driver */
void (*init)(struct uart_chip *chip);
diff --git a/hypervisor/uart-8250.c b/hypervisor/uart-8250.c
index 12c82fe6..d95bf557 100644
--- a/hypervisor/uart-8250.c
+++ b/hypervisor/uart-8250.c
@@ -24,15 +24,14 @@
#define UART_LSR 0x5
#define UART_LSR_THRE 0x20

-static inline void reg_out(struct uart_chip *chip, unsigned int offset,
- u32 value)
+static void reg_out_mmio32(struct uart_chip *chip, unsigned int reg, u32 value)
{
- chip->reg_out(chip->virt_base + chip->reg_dist * offset, value);
+ mmio_write32(chip->virt_base + reg * 4, value);
}

-static inline u32 reg_in(struct uart_chip *chip, unsigned int offset)
+static u32 reg_in_mmio32(struct uart_chip *chip, unsigned int reg)
{
- return chip->reg_in(chip->virt_base + chip->reg_dist * offset);
+ return mmio_read32(chip->virt_base + reg * 4);
}

static void uart_init(struct uart_chip *chip)
@@ -40,6 +39,7 @@ static void uart_init(struct uart_chip *chip)
void *clock_reg = (void*)(unsigned long)chip->virt_clock_reg;
unsigned int gate_nr = chip->debug_console->gate_nr;

+ /* clock setting only implemented on ARM via 32-bit MMIO */
if (clock_reg)
mmio_write32(clock_reg,
mmio_read32(clock_reg) | (1 << gate_nr));
@@ -48,27 +48,27 @@ static void uart_init(struct uart_chip *chip)
if (!chip->debug_console->divider)
return;

- reg_out(chip, UART_LCR, UART_LCR_DLAB);
- reg_out(chip, UART_DLL, chip->debug_console->divider & 0xff);
- reg_out(chip, UART_DLM, (chip->debug_console->divider >> 8) & 0xff);
- reg_out(chip, UART_LCR, UART_LCR_8N1);
+ chip->reg_out(chip, UART_LCR, UART_LCR_DLAB);
+ chip->reg_out(chip, UART_DLL, chip->debug_console->divider & 0xff);
+ chip->reg_out(chip, UART_DLM,
+ (chip->debug_console->divider >> 8) & 0xff);
+ chip->reg_out(chip, UART_LCR, UART_LCR_8N1);
}

static bool uart_is_busy(struct uart_chip *chip)
{
- return !(reg_in(chip, UART_LSR) & UART_LSR_THRE);
+ return !(chip->reg_in(chip, UART_LSR) & UART_LSR_THRE);
}

static void uart_write_char(struct uart_chip *chip, char c)
{
- reg_out(chip, UART_TX, c);
+ chip->reg_out(chip, UART_TX, c);
}

struct uart_chip uart_8250_ops = {
.init = uart_init,
.is_busy = uart_is_busy,
.write_char = uart_write_char,
- .reg_dist = 4,
- .reg_out = mmio_write32,
- .reg_in = mmio_read32,
+ .reg_out = reg_out_mmio32,
+ .reg_in = reg_in_mmio32,
};
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Documentation/debug-output.md | 2 +-
Documentation/{vga-console.txt => vga-console.md} | 20 +++++++++++---------
2 files changed, 12 insertions(+), 10 deletions(-)
rename Documentation/{vga-console.txt => vga-console.md} (72%)

diff --git a/Documentation/debug-output.md b/Documentation/debug-output.md
index fc7198ef..935a222b 100644
--- a/Documentation/debug-output.md
+++ b/Documentation/debug-output.md
@@ -21,7 +21,7 @@ Possible debug outputs for x86:
- JAILHOUSE_CON1_TYPE_VGA /* VGA console */

VGA output is only available for x86. For further documentation on VGA output
-see [vga-console.txt](vga-console.txt).
+see [vga-console.md](vga-console.md).

Possible debug outputs for arm and arm64:

diff --git a/Documentation/vga-console.txt b/Documentation/vga-console.md
similarity index 72%
rename from Documentation/vga-console.txt
rename to Documentation/vga-console.md
index e3e3cf26..7c9e1523 100644
--- a/Documentation/vga-console.txt
+++ b/Documentation/vga-console.md
@@ -12,31 +12,33 @@ computers often lack it. In order to address such scenarios, the VGA console
feature provides an alternative debugging method for x86 computers based on
the VGA text mode buffer.

+
Usage
-----

Add the following to the header section of your root cell's config:

-.debug_console = {
+ .debug_console = {
.address = 0xb8000,
.size = 0x1000,
.flags = JAILHOUSE_CON1_TYPE_VGA | JAILHOUSE_CON1_ACCESS_MMIO,
-},
+ },
+
+Boot using the following additional kernel parameters:

-Boot using the following kernel parameters:
- vga=normal nofb video=vesafb:off nomodeset i915.modeset=0
- [Note] add also other jailhouse parameters such as memmap=66M$0x3b000000
+ vga=normal nofb video=vesafb:off nomodeset i915.modeset=0

Load the jailhouse kernel module. Use the 'vbetool' command to set the
current VESA mode and enable your root cell.

- # modprobe jailhouse
- # vbetool vbemode set 3 && jailhouse enable configs/system.cell
+ # modprobe jailhouse
+ # vbetool vbemode set 3 && jailhouse enable configs/system.cell

[Note] for testing on QEMU replace 'system.cell' by 'qemu-vm.cell'.

+
References
----------

-[1] https://en.wikipedia.org/wiki/VGA-compatible_text_mode
-[2] http://wiki.osdev.org/Text_UI
+- https://en.wikipedia.org/wiki/VGA-compatible_text_mode
+- http://wiki.osdev.org/Text_UI
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
Define the path to config.h already in the top-level kbuild and just use
that variable later on when referencing that file.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Kbuild | 9 ++++++---
hypervisor/Makefile | 4 ++--
inmates/Makefile | 4 ++--
3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Kbuild b/Kbuild
index 01cf03d1..d991b66c 100644
--- a/Kbuild
+++ b/Kbuild
@@ -11,14 +11,17 @@
# the COPYING file in the top-level directory.
#

+INC_CONFIG_H = $(src)/hypervisor/include/jailhouse/config.h
+export INC_CONFIG_H
+
define filechk_config_mk
( \
- echo "\$$(foreach config,\$$(filter CONFIG_%, \
+ echo "\$$(foreach config,\$$(filter CONFIG_%, \
\$$(.VARIABLES)), \$$(eval undefine \$$(config)))"; \
- if [ -f $(src)/hypervisor/include/jailhouse/config.h ]; then \
+ if [ -f $(INC_CONFIG_H) ]; then \
sed -e "/^#define \([^[:space:]]*\)[[:space:]]*1/!d" \
-e "s/^#define \([^[:space:]]*\)[[:space:]]*1/\1=y/"\
- $(src)/hypervisor/include/jailhouse/config.h; \
+ $(INC_CONFIG_H); \
fi \
)
endef
diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 15956017..919c87ae 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -26,8 +26,8 @@ KBUILD_CFLAGS := -g -Os -Wall -Wstrict-prototypes -Wtype-limits \

include $(src)/arch/$(SRCARCH)/Makefile

-ifneq ($(wildcard $(obj)/include/jailhouse/config.h),)
-KBUILD_CFLAGS += -include $(obj)/include/jailhouse/config.h
+ifneq ($(wildcard $(INC_CONFIG_H)),)
+KBUILD_CFLAGS += -include $(INC_CONFIG_H)
endif

GCOV_PROFILE := n
diff --git a/inmates/Makefile b/inmates/Makefile
index 21a37b64..f8fb1a44 100644
--- a/inmates/Makefile
+++ b/inmates/Makefile
@@ -27,8 +27,8 @@ KBUILD_CFLAGS := -g -Os -Wall -Wstrict-prototypes -Wtype-limits \
-Wmissing-declarations -Wmissing-prototypes \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-fno-common -fno-stack-protector $(INCLUDES)
-ifneq ($(wildcard $(src)/../hypervisor/include/jailhouse/config.h),)
-KBUILD_CFLAGS += -include $(src)/../hypervisor/include/jailhouse/config.h
+ifneq ($(wildcard $(INC_CONFIG_H)),)
+KBUILD_CFLAGS += -include $(INC_CONFIG_H)
endif

OBJCOPYFLAGS := -O binary
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
By exporting every CONFIG variable we add to config.mk, we can pull the
inclusion of that file to higher levels, reducing the need to add it on
a per-arch basis. We still cannot include it at the top level because
the driver has to use the kernel's config, not our own.

This makes config.mk hypervisor and inmate-wide available.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Kbuild | 9 ++++++---
hypervisor/Makefile | 2 ++
hypervisor/arch/arm-common/Kbuild | 2 --
inmates/Makefile | 2 ++
inmates/lib/arm/Makefile.lib | 2 --
inmates/lib/arm64/Makefile.lib | 2 --
6 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/Kbuild b/Kbuild
index d991b66c..6a8d1a28 100644
--- a/Kbuild
+++ b/Kbuild
@@ -14,14 +14,17 @@
INC_CONFIG_H = $(src)/hypervisor/include/jailhouse/config.h
export INC_CONFIG_H

+define sed_config_mk
+ "/^#define \([^[:space:]]*\)[[:space:]]*1/!d; \
+ s/^#define \([^[:space:]]*\)[[:space:]]*1/\1=y\nexport \1/"
+endef
+
define filechk_config_mk
( \
echo "\$$(foreach config,\$$(filter CONFIG_%, \
\$$(.VARIABLES)), \$$(eval undefine \$$(config)))"; \
if [ -f $(INC_CONFIG_H) ]; then \
- sed -e "/^#define \([^[:space:]]*\)[[:space:]]*1/!d" \
- -e "s/^#define \([^[:space:]]*\)[[:space:]]*1/\1=y/"\
- $(INC_CONFIG_H); \
+ sed -e $(sed_config_mk) $(INC_CONFIG_H); \
fi \
)
endef
diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 919c87ae..83a8d9f5 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -16,6 +16,8 @@
# Copyright (c) Linux kernel developers, 2014
#

+-include $(GEN_CONFIG_MK)
+
LINUXINCLUDE := -I$(src)/arch/$(SRCARCH)/include \
-I$(src)/arch/$(SRCARCH)/include/generated \
-I$(src)/include
diff --git a/hypervisor/arch/arm-common/Kbuild b/hypervisor/arch/arm-common/Kbuild
index fe552c20..c71f7561 100644
--- a/hypervisor/arch/arm-common/Kbuild
+++ b/hypervisor/arch/arm-common/Kbuild
@@ -10,8 +10,6 @@
# the COPYING file in the top-level directory.
#

-include $(GEN_CONFIG_MK)
-
GCOV_PROFILE := n

OBJS-y += dbg-write.o lib.o psci.o control.o paging.o mmu_cell.o
diff --git a/inmates/Makefile b/inmates/Makefile
index f8fb1a44..b5fa016e 100644
--- a/inmates/Makefile
+++ b/inmates/Makefile
@@ -10,6 +10,8 @@
# the COPYING file in the top-level directory.
#

+-include $(GEN_CONFIG_MK)
+
INMATES_LIB = $(src)/lib/$(SRCARCH)
export INMATES_LIB

diff --git a/inmates/lib/arm/Makefile.lib b/inmates/lib/arm/Makefile.lib
index 0293c068..77e3bdcf 100644
--- a/inmates/lib/arm/Makefile.lib
+++ b/inmates/lib/arm/Makefile.lib
@@ -12,8 +12,6 @@
# the COPYING file in the top-level directory.
#

--include $(obj)/../../../hypervisor/include/generated/config.mk
-
KBUILD_AFLAGS := $(filter-out -include asm/unified.h,$(KBUILD_AFLAGS))

KBUILD_CFLAGS += -I$(INMATES_LIB)/include
diff --git a/inmates/lib/arm64/Makefile.lib b/inmates/lib/arm64/Makefile.lib
index 06dc5932..c7dd9d02 100644
--- a/inmates/lib/arm64/Makefile.lib
+++ b/inmates/lib/arm64/Makefile.lib
@@ -12,8 +12,6 @@
# the COPYING file in the top-level directory.
#

--include $(obj)/../../../hypervisor/include/generated/config.mk
-
KBUILD_CFLAGS += -I$(INMATES_LIB)/include
KBUILD_CFLAGS += -I$(INMATES_LIB)/../arm-common/include
KBUILD_AFLAGS += -I$(INMATES_LIB)/include
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

Signed-off-by: Henning Schild <henning...@siemens.com>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Documentation/gcov.txt | 34 +++++++++++++++++++++++++++++++
Documentation/hypervisor-configuration.md | 2 ++
2 files changed, 36 insertions(+)
create mode 100644 Documentation/gcov.txt

diff --git a/Documentation/gcov.txt b/Documentation/gcov.txt
new file mode 100644
index 00000000..c7edefc3
--- /dev/null
+++ b/Documentation/gcov.txt
@@ -0,0 +1,34 @@
+Extracting code coverage information from the hypervisor
+========================================================
+
+Jailhouse supports collecting code coverage information while it is running.
+In order to use that feature you have to set CONFIG_JAILHOUSE_GCOV in the
+configuration system. (see Documentation/hypervisor-configuration.txt)
+
+Now rebuild jailhouse and run your favorite example cell. Follow the usual
+workflow until `jailhouse disable`, but do not unload the jailhouse kernel
+module.
+
+While the module is loaded but the hypervisor is not running anymore, you can
+get a copy of the hypervisor-image containing runtime data. And that data
+includes code coverage information. The jailhouse tools allow you to extract
+gcov data from that image (*.gcda-files). And these files can be processed by
+a number of higher level tools.
+
+Example workflow
+----------------
+# enter jailhouse source directory
+cd /path/to/jailhouse
+# remove *.gcda files from previous run
+find -iname *.gcda -exec rm -f {} +
+# now run jailhouse until you eventually "disable" it again
+.....
+jailhouse disable
+# extract the *.gcda files, which will be placed in the src directory
+./tools/jailhouse-gcov-extract
+# at that point you can use higher level tools to process the data
+# here an example for generating an html-report with
+# lcov (http://ltp.sourceforge.net/coverage/lcov.php)
+lcov -o /tmp/coverage.info --capture -d .
+genhtml /tmp/coverage.info --output-directory /tmp/coverage/
+firefox /tmp/coverage/index.html
diff --git a/Documentation/hypervisor-configuration.md b/Documentation/hypervisor-configuration.md
index 1be20510..1394fc78 100644
--- a/Documentation/hypervisor-configuration.md
+++ b/Documentation/hypervisor-configuration.md
@@ -20,6 +20,8 @@ General configuration parameters
* Linux inmates will dump a stack trace in this case.
*/
#define CONFIG_CRASH_CELL_ON_PANIC 1
+/* Enable code coverage data collection (see Documentation/gcov.txt) */
+#define CONFIG_JAILHOUSE_GCOV 1
```

### Example board specific configurations
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
Avoids writing a "--help" file when someone requests the usage of this
tool.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
tools/jailhouse-config-collect.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/jailhouse-config-collect.tmpl b/tools/jailhouse-config-collect.tmpl
index 64a8d956..c8ca89c9 100644
--- a/tools/jailhouse-config-collect.tmpl
+++ b/tools/jailhouse-config-collect.tmpl
@@ -29,7 +29,7 @@ if test "x$( id -u )" != "x0"; then
exit 1
fi

-if test -z "$1"; then
+if test -z "$1" || test "$1" = "--help"; then
echo "Usage: $0 mytarget.tar" 1>&2
exit 1
fi
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
This is actually no longer needed: kbuild generates proper dependencies
for rebuilding files that include this header, and the initial build no
longer needs to be triggered by such a rule due to generating the file
prior to entering the hypervisor or driver subdir.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Kbuild | 1 -
driver/Makefile | 2 --
hypervisor/Makefile | 2 --
3 files changed, 5 deletions(-)

diff --git a/Kbuild b/Kbuild
index 6a8d1a28..620c856c 100644
--- a/Kbuild
+++ b/Kbuild
@@ -40,7 +40,6 @@ define filechk_version
endef

GEN_VERSION_H := $(obj)/hypervisor/include/generated/version.h
-export GEN_VERSION_H

$(GEN_VERSION_H): $(src)/Makefile FORCE
$(call filechk,version)
diff --git a/driver/Makefile b/driver/Makefile
index 8260fd98..9febfe26 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -20,8 +20,6 @@ jailhouse-y := cell.o main.o sysfs.o
jailhouse-$(CONFIG_PCI) += pci.o
jailhouse-$(CONFIG_OF) += vpci_template.dtb.o

-$(obj)/main.o: $(GEN_VERSION_H)
-
targets += vpci_template.dtb vpci_template.dtb.S

.SECONDARY: \
diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 83a8d9f5..2c4d634a 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -77,8 +77,6 @@ $(obj)/$(defines-file): $(obj)/arch/$(SRCARCH)/asm-defines.s
$(foreach co,$(CORE_OBJECTS),\
$(eval $(obj)/$(co): $(obj)/$(defines-file)))

-$(obj)/setup.o: $(GEN_VERSION_H)
-
arch-builtin: $(obj)/$(defines-file) FORCE
$(Q)$(MAKE) $(build)=$(obj)/arch/$(SRCARCH)

--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
Update to the changes in the debug console access mode and register
distance configuration.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Documentation/debug-output.md | 26 +++++++++++++++-----------
Documentation/vga-console.txt | 2 +-
2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/Documentation/debug-output.md b/Documentation/debug-output.md
index 041efc9c..b75129df 100644
--- a/Documentation/debug-output.md
+++ b/Documentation/debug-output.md
@@ -25,9 +25,13 @@ Possible debug outputs for arm and arm64:
- JAILHOUSE_CON1_TYPE_8250 /* 8250 compatible UART*/
- JAILHOUSE_CON1_TYPE_PL011 /* AMBA PL011 UART */

-Additional flags that can be or'ed:
- - JAILHOUSE_CON1_FLAG_PIO /* x86 only */
- - JAILHOUSE_CON1_FLAG_MMIO /* x86 and ARM. Should always be set on ARM. */
+Possible access modes, to be or'ed:
+ - JAILHOUSE_CON1_ACCESS_PIO /* PIO, x86 only */
+ - JAILHOUSE_CON1_ACCESS_MMIO /* MMIO, x86 and ARM */
+
+Possible register distances (MMIO only, PIO is implicitly 1-byte), to be or'ed:
+ - JAILHOUSE_CON1_REGDIST_1 /* 1-byte distance, x86 only */
+ - JAILHOUSE_CON1_REGDIST_4 /* 4-bytes distance, x86 and ARM */

### .address and .size
The address member denotes the base address of the Debug console (PIO or MMIO
@@ -103,17 +107,17 @@ As well as the hypervisor, inmates choose their output driver during runtime.
The particular Driver is chosen by command line arguments. If no arguments
are provided, inmates choose a default output driver.

-On X86, default output driver is PIO UART on port 0x3f8, ARM devices choose
+On x86, default output driver is PIO UART on port 0x3f8, ARM devices choose
their output driver according to their settings in mach/debug.h.

### Parameter list
-| Parameter | Description | X86 | ARM and ARM64 |
-|---------------|:--------------------------:|-----------:|----------------:|
-| con-type | Debug Output Driver | PIO, MMIO | 8250, PL011 |
-| con-base | Base Address (PIO or MMIO) | e.g. 0x3f8 | e.g. 0x70006000 |
-| con-divider | UART divider | 0x1 | 0x0d |
-| con-clock-reg | Clock Register | | |
-| con-gate-nr | Clock Gate Nr | | |
+| Parameter | Description | x86 | ARM and ARM64 |
+|:--------------|:----------------------|:-------------------|:----------------|
+| con-type | Debug Output Driver | PIO, MMIO8, MMIO32 | 8250, PL011 |
+| con-base | PIO/MMIO Base Address | e.g. 0x3f8 | e.g. 0x70006000 |
+| con-divider | UART divider | 0x1 | 0x0d |
+| con-clock-reg | Clock Register | not supported | |
+| con-gate-nr | Clock Gate Nr | not supported | |

All architectures support the empty con-type "none" and "JAILHOUSE". The
"JAILHOUSE" console type uses the hypervisor's debug output via hypercalls.
diff --git a/Documentation/vga-console.txt b/Documentation/vga-console.txt
index 81dcc403..e3e3cf26 100644
--- a/Documentation/vga-console.txt
+++ b/Documentation/vga-console.txt
@@ -20,7 +20,7 @@ Add the following to the header section of your root cell's config:
.debug_console = {
.address = 0xb8000,
.size = 0x1000,
- .flags = JAILHOUSE_CON1_TYPE_VGA | JAILHOUSE_CON1_FLAG_MMIO,
+ .flags = JAILHOUSE_CON1_TYPE_VGA | JAILHOUSE_CON1_ACCESS_MMIO,
},

Boot using the following kernel parameters:
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

This introduces pretty minimal GCOV support. The hypervisor does not
need to understand much of that. It just needs to call the init
functions to gather the addresses of the gcov related data structures.
These are just linked together so something outside the hypervisor can
look at them later.

Signed-off-by: Henning Schild <henning...@siemens.com>
Tested-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
[Jan: Remove .gcno clean-files rule - done by kbuild]
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
hypervisor/Makefile | 5 ++++
hypervisor/arch/arm-common/Kbuild | 1 +
hypervisor/arch/arm/Kbuild | 6 +++++
hypervisor/arch/x86/Kbuild | 3 ++-
hypervisor/gcov.c | 50 +++++++++++++++++++++++++++++++++++
hypervisor/hypervisor.lds.S | 5 ++++
hypervisor/include/jailhouse/gcov.h | 17 ++++++++++++
hypervisor/include/jailhouse/header.h | 3 +++
hypervisor/setup.c | 5 +++-
9 files changed, 93 insertions(+), 2 deletions(-)
create mode 100644 hypervisor/gcov.c
create mode 100644 hypervisor/include/jailhouse/gcov.h

diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 0f6cd0fa..0f3c7bcb 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -37,6 +37,11 @@ GCOV_PROFILE := n
CORE_OBJECTS = setup.o printk.o paging.o control.o lib.o mmio.o pci.o ivshmem.o
CORE_OBJECTS += uart.o uart-8250.o

+ifdef CONFIG_JAILHOUSE_GCOV
+CORE_OBJECTS += gcov.o
+endif
+ccflags-$(CONFIG_JAILHOUSE_GCOV) += -fprofile-arcs -ftest-coverage
+
clean-dirs := arch/$(SRCARCH)/include/generated

define sed-y
diff --git a/hypervisor/arch/arm-common/Kbuild b/hypervisor/arch/arm-common/Kbuild
index c71f7561..7874b9e6 100644
--- a/hypervisor/arch/arm-common/Kbuild
+++ b/hypervisor/arch/arm-common/Kbuild
@@ -11,6 +11,7 @@
#

GCOV_PROFILE := n
+ccflags-$(CONFIG_JAILHOUSE_GCOV) += -fprofile-arcs -ftest-coverage

OBJS-y += dbg-write.o lib.o psci.o control.o paging.o mmu_cell.o
OBJS-y += irqchip.o pci.o ivshmem.o uart-pl011.o uart-xuartps.o
diff --git a/hypervisor/arch/arm/Kbuild b/hypervisor/arch/arm/Kbuild
index 8da3e425..b996871f 100644
--- a/hypervisor/arch/arm/Kbuild
+++ b/hypervisor/arch/arm/Kbuild
@@ -20,5 +20,11 @@ obj-y := $(COMMON_OBJECTS)
obj-y += entry.o exception.o setup.o control.o traps.o mmio.o lib.o
obj-y += mmu_hyp.o caches.o mach-stubs.o

+# in here we switch of the MMU and stuff, cant profile such code
+# NOTE
+# gcc7 will bring a new function attribute "no_profile_instrument_function"
+# should switch to that for higher granularity, but gcc7 is not even there
+CFLAGS_mmu_hyp.o += -fno-profile-arcs -fno-test-coverage
+
obj-$(CONFIG_ARM_GIC_V3) += gic-v3.o
obj-$(CONFIG_MACH_VEXPRESS) += mach-vexpress.o
diff --git a/hypervisor/arch/x86/Kbuild b/hypervisor/arch/x86/Kbuild
index b3253197..07bb04f0 100644
--- a/hypervisor/arch/x86/Kbuild
+++ b/hypervisor/arch/x86/Kbuild
@@ -1,7 +1,7 @@
#
# Jailhouse, a Linux-based partitioning hypervisor
#
-# Copyright (c) Siemens AG, 2013
+# Copyright (c) Siemens AG, 2013-2017
# Copyright (c) Valentine Sinitsyn, 2014
#
# Authors:
@@ -13,6 +13,7 @@
#

GCOV_PROFILE := n
+ccflags-$(CONFIG_JAILHOUSE_GCOV) += -fprofile-arcs -ftest-coverage

BUILT_IN_OBJECTS := built-in-amd.o built-in-intel.o
COMMON_OBJECTS := apic.o dbg-write.o entry.o setup.o control.o mmio.o iommu.o \
diff --git a/hypervisor/gcov.c b/hypervisor/gcov.c
new file mode 100644
index 00000000..6055bdd5
--- /dev/null
+++ b/hypervisor/gcov.c
@@ -0,0 +1,50 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2017
+ *
+ * Authors:
+ * Henning Schild <henning...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+#include <jailhouse/entry.h>
+#include <jailhouse/gcov.h>
+
+extern unsigned long __init_array_start[], __init_array_end[];
+
+/* the actual data structure is bigger but we just need to know the version
+ * independent beginning to link the elements to a list */
+struct gcov_min_info {
+ unsigned int version;
+ struct gcov_min_info *next;
+};
+
+void gcov_init(void) {
+ unsigned long *iarray = __init_array_start;
+ unsigned long *iarray_end = __init_array_end;
+ void (*__init_func)(void);
+
+ while (iarray < iarray_end) {
+ __init_func = (void(*)(void))iarray[0];
+ iarray++;
+ __init_func();
+ }
+}
+
+void __gcov_init(struct gcov_min_info *info);
+void __gcov_merge_add(void *counters, unsigned int n_counters);
+
+/* just link them all together and leave the head in the header
+ * where a processing tool can find it */
+void __gcov_init(struct gcov_min_info *info)
+{
+ info->next = (struct gcov_min_info *)hypervisor_header.gcov_info_head;
+ hypervisor_header.gcov_info_head = info;
+}
+
+/* Satisfy the linker, never called */
+void __gcov_merge_add(void *counters, unsigned int n_counters)
+{
+}
diff --git a/hypervisor/hypervisor.lds.S b/hypervisor/hypervisor.lds.S
index a00f1aa4..671dde28 100644
--- a/hypervisor/hypervisor.lds.S
+++ b/hypervisor/hypervisor.lds.S
@@ -30,6 +30,11 @@ SECTIONS
. = ALIGN(16);
.data : { *(.data) }

+ . = ALIGN(8);
+ __init_array_start = .;
+ .init_array : { *(SORT(.init_array.*)) *(.init_array) }
+ __init_array_end = .;
+
ARCH_SECTIONS

. = ALIGN(16);
diff --git a/hypervisor/include/jailhouse/gcov.h b/hypervisor/include/jailhouse/gcov.h
new file mode 100644
index 00000000..b0a13e2b
--- /dev/null
+++ b/hypervisor/include/jailhouse/gcov.h
@@ -0,0 +1,17 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2017
+ *
+ * Authors:
+ * Henning Schild <henning...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#ifdef CONFIG_JAILHOUSE_GCOV
+void gcov_init(void);
+#else
+static inline void gcov_init(void) {}
+#endif
diff --git a/hypervisor/include/jailhouse/header.h b/hypervisor/include/jailhouse/header.h
index e31cba43..738389bb 100644
--- a/hypervisor/include/jailhouse/header.h
+++ b/hypervisor/include/jailhouse/header.h
@@ -58,6 +58,9 @@ struct jailhouse_header {
/** Offset of the console page inside the hypervisor memory
* @note Filled at build time. */
unsigned long console_page;
+ /** Pointer to the first struct gcov_info
+ * @note Filled at build time */
+ void *gcov_info_head;

/** Configured maximum logical CPU ID + 1.
* @note Filled by Linux loader driver before entry. */
diff --git a/hypervisor/setup.c b/hypervisor/setup.c
index abae3108..3038fe8c 100644
--- a/hypervisor/setup.c
+++ b/hypervisor/setup.c
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013-2016
+ * Copyright (c) Siemens AG, 2013-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -13,6 +13,7 @@
#include <jailhouse/processor.h>
#include <jailhouse/printk.h>
#include <jailhouse/entry.h>
+#include <jailhouse/gcov.h>
#include <jailhouse/mmio.h>
#include <jailhouse/paging.h>
#include <jailhouse/control.h>
@@ -51,6 +52,8 @@ static void init_early(unsigned int cpu_id)
JAILHOUSE_VERSION, cpu_id);
printk("Code location: %p\n", __text_start);

+ gcov_init();
+
error = paging_init();
if (error)
return;
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com
We have at least 2 cores per builder, use them all.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
ci/build-all-configs.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci/build-all-configs.sh b/ci/build-all-configs.sh
index 0ea8bc2c..c0a6d6a6 100755
--- a/ci/build-all-configs.sh
+++ b/ci/build-all-configs.sh
@@ -48,7 +48,7 @@ for CONFIG in $CONFIGS; do
esac

$PREFIX make KDIR=ci/linux/build-$CONFIG ARCH=$ARCH \
- CROSS_COMPILE=$CROSS_COMPILE
+ CROSS_COMPILE=$CROSS_COMPILE -j $((2*`nproc`))

# Keep the clean run out of sight for cov-build so that results are
# accumulated as far as possible. Multiple compilations of the same
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:21 AM4/19/17
to jailho...@googlegroups.com, Henning Schild, Ralf Ramsauer
This is a pile of changes from the last week plus the merge of Hennings
gcov support patches (slightly adjusted). Key changes:

- 8-bit MMIO UART support on x86 to enable the Denverton SoC
- retrieve x86 debug console parameters from Linux on config generation
- rework build system to enable config.mk for hypervisor core
(enhanced version of Henning's patch)
- further cleanups of build system around generated files and
dependencies
- fix for device tree overlay registration (ARM/ARM64)
- various smaller changes

Jan


CC: Henning Schild <henning...@siemens.com>
CC: Ralf Ramsauer <ralf.r...@oth-regensburg.de>

Henning Schild (8):
make: move config system and version.h from hypervisor core to root
driver: create new function to undo firmware mapping
driver: keep the firmware mapped after "disable"
driver: make the firware visisble in sysfs
core: move JAILHOUSE_BASE into a generic header
hypervisor: introduce GCOV support
tools: new tool to get gcov data out of dirty firmware
Documentation: add GCOV code coverage documentation

Jan Kiszka (17):
driver: Remove bogus of_node_put
configs: Add DRM MMIO region
core, configs: Replace JAILHOUSE_CON1_TYPE_UART_X86 with ...TYPE_8250
core: Refactor reg_in/out callbacks for 8250
core, config: Rework debug console access type configuration
x86: Add support for 8-bit MMIO 1-byte distance UART
inmate: x86: Add support for 8-bit MMIO 1-byte distance UART
Documentation: Update debug console description
Documentation: Reformat debug-output.md
Documentation: Convert vga-console.txt to markdown
tools: Process --help in jailhouse-config-collect
tools: config-create: Retrieve debug console from system settings
core, inmates: Introduce and use INC_CONFIG_H
core, inmates: Export CONFIG vars to simplify config.mk inclusion
core, driver: Remove explicit dependency on version.h
core: Rework architecture subdir build
ci: Parallelize the build

.gitignore | 2 +
Documentation/debug-output.md | 121 +++++------
Documentation/gcov.txt | 34 ++++
Documentation/hypervisor-configuration.md | 2 +
Documentation/{vga-console.txt => vga-console.md} | 22 +-
Kbuild | 50 ++++-
ci/build-all-configs.sh | 2 +-
configs/amd-seattle.c | 3 +-
configs/bananapi.c | 3 +-
configs/f2a88xm-hd3.c | 4 +-
configs/foundation-v8.c | 3 +-
configs/hikey.c | 14 +-
configs/imb-a180.c | 4 +-
configs/jetson-tk1.c | 3 +-
configs/jetson-tx1.c | 3 +-
configs/orangepi0.c | 3 +-
configs/qemu-vm.c | 4 +-
configs/vexpress.c | 3 +-
configs/zynqmp-zcu102.c | 3 +-
driver/Makefile | 2 -
driver/main.c | 23 ++-
driver/main.h | 3 +-
driver/pci.c | 2 -
driver/sysfs.c | 27 ++-
driver/sysfs.h | 4 +-
hypervisor/Makefile | 64 ++----
hypervisor/arch/arm-common/Kbuild | 5 +-
hypervisor/arch/arm/Kbuild | 6 +
hypervisor/arch/arm/include/asm/jailhouse_header.h | 13 ++
.../arch/arm/include/asm/jailhouse_hypercall.h | 3 +-
.../arch/arm64/include/asm/jailhouse_header.h | 13 ++
hypervisor/arch/x86/Kbuild | 3 +-
hypervisor/arch/x86/dbg-write.c | 32 ++-
hypervisor/arch/x86/include/asm/jailhouse_header.h | 19 ++
.../arch/x86/include/asm/jailhouse_hypercall.h | 13 +-
hypervisor/gcov.c | 50 +++++
hypervisor/hypervisor.lds.S | 9 +-
hypervisor/include/jailhouse/cell-config.h | 28 ++-
hypervisor/include/jailhouse/gcov.h | 17 ++
hypervisor/include/jailhouse/header.h | 7 +-
hypervisor/include/jailhouse/uart.h | 5 +-
hypervisor/setup.c | 5 +-
hypervisor/uart-8250.c | 28 +--
inmates/Makefile | 6 +-
inmates/lib/arm/Makefile.lib | 2 -
inmates/lib/arm64/Makefile.lib | 2 -
inmates/lib/x86/printk.c | 24 ++-
tools/Makefile | 14 +-
tools/jailhouse-cell-linux | 2 +-
tools/jailhouse-config-collect.tmpl | 2 +-
tools/jailhouse-config-create | 46 ++++-
tools/jailhouse-gcov-extract.c | 222 +++++++++++++++++++++
tools/jailhouse-hardware-check | 2 +-
tools/root-cell-config.c.tmpl | 24 ++-
54 files changed, 783 insertions(+), 227 deletions(-)
create mode 100644 Documentation/gcov.txt
rename Documentation/{vga-console.txt => vga-console.md} (67%)
create mode 100644 hypervisor/arch/arm/include/asm/jailhouse_header.h
create mode 100644 hypervisor/arch/arm64/include/asm/jailhouse_header.h
create mode 100644 hypervisor/arch/x86/include/asm/jailhouse_header.h
create mode 100644 hypervisor/gcov.c
create mode 100644 hypervisor/include/jailhouse/gcov.h
create mode 100644 tools/jailhouse-gcov-extract.c

--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:22 AM4/19/17
to jailho...@googlegroups.com
Extend the config generator to retrieve all necessary information about
the hypervisor debug console from Linux settings. This is specifically
interesting for MMIO-based UARTs.

The user can select the desired console via a command line option.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
tools/jailhouse-config-create | 46 ++++++++++++++++++++++++++++++++++++++++---
tools/root-cell-config.c.tmpl | 20 +++++++++++++++++--
2 files changed, 61 insertions(+), 5 deletions(-)

diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create
index d3278ab2..b0b95579 100755
--- a/tools/jailhouse-config-create
+++ b/tools/jailhouse-config-create
@@ -2,7 +2,7 @@
#
# Jailhouse, a Linux-based partitioning hypervisor
#
-# Copyright (c) Siemens AG, 2014-2016
+# Copyright (c) Siemens AG, 2014-2017
# Copyright (c) Valentine Sinitsyn, 2014-2015
#
# Authors:
@@ -56,6 +56,12 @@ parser.add_argument('-t', '--template-dir',
default=template_default_dir,
action='store',
type=str)
+parser.add_argument('-c', '--console',
+ help='the name of the UART device that should be used as '
+ 'primary hypervisor debug console ("ttyX" or "none")',
+ default='ttyS0',
+ action='store',
+ type=str)

memargs = [['--mem-inmates', '2M', 'inmate'],
['--mem-hv', '64M', 'hypervisor']]
@@ -95,6 +101,10 @@ inputs['files'].add('/sys/firmware/acpi/tables/MCFG')
# optional files
inputs['files_opt'].add('/sys/class/dmi/id/product_name')
inputs['files_opt'].add('/sys/class/dmi/id/sys_vendor')
+inputs['files_opt'].add('/sys/class/tty/*/iomem_base')
+inputs['files_opt'].add('/sys/class/tty/*/iomem_reg_shift')
+inputs['files_opt'].add('/sys/class/tty/*/io_type')
+inputs['files_opt'].add('/sys/class/tty/*/port')
inputs['files_opt'].add('/sys/devices/jailhouse/enabled')
# platform specific files
inputs['files_intel'].add('/sys/firmware/acpi/tables/DMAR')
@@ -566,7 +576,7 @@ class IOMemRegionTree:
return regions


-class IOMMUConfig(object):
+class IOMMUConfig:
def __init__(self, props):
self.base_addr = props['base_addr']
self.mmio_size = props['mmio_size']
@@ -1084,6 +1094,33 @@ def get_cpu_vendor():
return cpuvendor


+class DebugConsole:
+ def __init__(self, console):
+ self.address = 0
+ self.pio = False
+ self.dist1 = False
+ if console != 'none':
+ type = int(input_readline('/sys/class/tty/%s/io_type' % console,
+ True))
+ if type == 0:
+ self.address = int(input_readline(
+ '/sys/class/tty/%s/port' % console, True), 16)
+ self.pio = True
+ self.dist1 = True
+ elif type in (2, 3):
+ shift = int(input_readline(
+ '/sys/class/tty/%s/iomem_reg_shift' % console, True))
+ if (type == 2 and shift != 0) or (type == 3 and shift != 2):
+ print('WARNING: Unexpected UART MMIO access mode: '
+ 'type=%d, shift=%d. Disabling console.' %
+ (type, shift))
+ else:
+ self.address = int(input_readline(
+ '/sys/class/tty/%s/iomem_base' % console, True), 16)
+ self.pio = False
+ self.dist1 = (shift == 0)
+
+
if options.generate_collector:
f = open(options.file, 'w')
filelist = ' '.join(inputs['files'])
@@ -1155,6 +1192,8 @@ cpucount = count_cpus()

pm_timer_base = parse_ioports()

+debug_console = DebugConsole(options.console)
+

f = open(options.file, 'w')
tmpl = Template(filename=os.path.join(options.template_dir,
@@ -1171,7 +1210,8 @@ kwargs = {
'irqchips': ioapics,
'pm_timer_base': pm_timer_base,
'mmconfig': mmconfig,
- 'iommu_units': iommu_units
+ 'iommu_units': iommu_units,
+ 'debug_console': debug_console,
}

f.write(tmpl.render(**kwargs))
diff --git a/tools/root-cell-config.c.tmpl b/tools/root-cell-config.c.tmpl
index e2829418..0d2ea295 100644
--- a/tools/root-cell-config.c.tmpl
+++ b/tools/root-cell-config.c.tmpl
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2014-2016
+ * Copyright (c) Siemens AG, 2014-2017
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
@@ -61,9 +61,25 @@ struct {
.size = ${hex(hvmem[1])},
},
.debug_console = {
- .address = 0x3f8,
+ % if debug_console.address != 0:
+ .address = ${hex(debug_console.address)},
+ % if not debug_console.pio:
+ .size = 0x1000,
+ % endif
.flags = JAILHOUSE_CON1_TYPE_8250 |
+ % if debug_console.pio:
JAILHOUSE_CON1_ACCESS_PIO |
+ % else:
+ JAILHOUSE_CON1_ACCESS_MMIO |
+ % endif
+ % if debug_console.dist1:
+ JAILHOUSE_CON1_REGDIST_1 |
+ % else:
+ JAILHOUSE_CON1_REGDIST_4 |
+ % endif
+ % else:
+ .flags = JAILHOUSE_CON1_TYPE_NONE |
+ % endif
JAILHOUSE_CON2_TYPE_ROOTPAGE,
},
.platform_info = {
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:22 AM4/19/17
to jailho...@googlegroups.com
Avoid the recursive make invocation just to express the dependency of
the arch tree on the generated asm-defines.h. We can do better than
that.

The trick is to let the subdir depend on the asm-defines.h, and the
built-in.o on the subdir, with proper obj prefixes. But just like for
the generated files, do not create the dependency if we are cleaning up,
that would fail.

Rename the defines-file variable at this chance to something more
meaningful.

We can furthermore clean up the dependencies: asm-defines.h is for
assembly only, and that lives in the arch subdir. So there is no need to
make the CORE_OBJECTS depend on that header.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
hypervisor/Makefile | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 2c4d634a..0f6cd0fa 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -63,36 +63,35 @@ define cmd_defines
echo "#endif" ) > $@
endef

-defines-file := arch/$(SRCARCH)/include/generated/asm/asm-defines.h
+ASM_DEFINES_H := arch/$(SRCARCH)/include/generated/asm/asm-defines.h

-targets := $(defines-file) arch/$(SRCARCH)/asm-defines.s
+targets := $(ASM_DEFINES_H) arch/$(SRCARCH)/asm-defines.s

$(obj)/arch/$(SRCARCH)/asm-defines.s: $(src)/arch/$(SRCARCH)/asm-defines.c
$(call if_changed_dep,cc_s_c)

-$(obj)/$(defines-file): $(obj)/arch/$(SRCARCH)/asm-defines.s
+$(obj)/$(ASM_DEFINES_H): $(obj)/arch/$(SRCARCH)/asm-defines.s
$(Q)mkdir -p $(dir $@)
$(call cmd,defines)

-$(foreach co,$(CORE_OBJECTS),\
- $(eval $(obj)/$(co): $(obj)/$(defines-file)))
-
-arch-builtin: $(obj)/$(defines-file) FORCE
- $(Q)$(MAKE) $(build)=$(obj)/arch/$(SRCARCH)
+# Do not generate files by creating dependencies if we are cleaning up
+ifeq ($(filter %/Makefile.clean,$(MAKEFILE_LIST)),)
+$(obj)/arch/$(SRCARCH): $(obj)/$(ASM_DEFINES_H)
+endif

always :=

+subdir-y := arch/$(SRCARCH)
+
define BUILD_JAILHOUSE_template
always += jailhouse$(1).bin

+$$(obj)/arch/$$(SRCARCH)/built-in$(1).o: $$(obj)/arch/$$(SRCARCH)
+
hypervisor$(1)-y := $$(CORE_OBJECTS) arch/$$(SRCARCH)/built-in$(1).o \
hypervisor.lds
targets += $$(hypervisor$(1)-y)

-# Need fake recipe here so make will consider this a volatile target
-$$(obj)/arch/$$(SRCARCH)/built-in$(1).o: arch-builtin
- @
-
HYPERVISOR$(1)_OBJS = $$(addprefix $$(obj)/,$$(hypervisor$(1)-y))

LDFLAGS_hypervisor$(1).o := -T
@@ -114,5 +113,3 @@ $(foreach variant,$(BUILD_VARIANTS),\
else
$(eval $(call BUILD_JAILHOUSE_template,))
endif
-
-.PHONY: arch-builtin
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:23 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

We used to unmap the firmware image right after "jailhouse disable".
Change that and keep the firmware mapped until we exit the module or
restart jailhouse. This way we can look into the firmware that just ran.

This will be used by later patches.

Signed-off-by: Henning Schild <henning...@siemens.com>
Tested-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
driver/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/driver/main.c b/driver/main.c
index 7d02092e..676365c4 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -394,6 +394,9 @@ static int jailhouse_cmd_enable(struct jailhouse_system __user *arg)
#ifdef JAILHOUSE_BORROW_ROOT_PT
remap_addr = JAILHOUSE_BASE;
#endif
+ /* Unmap hypervisor_mem from a previous "enable". The mapping has to be
+ * redone since the root-cell config might have changed. */
+ jailhouse_firmware_free();
/* Map physical memory region reserved for Jailhouse. */
hypervisor_mem = jailhouse_ioremap(hv_mem->phys_start, remap_addr,
hv_mem->size);
@@ -609,8 +612,6 @@ static int jailhouse_cmd_disable(void)

update_last_console();

- jailhouse_firmware_free();
-
jailhouse_cell_delete_root();
jailhouse_enabled = false;
module_put(THIS_MODULE);
@@ -833,6 +834,7 @@ static void __exit jailhouse_exit(void)
unregister_reboot_notifier(&jailhouse_shutdown_nb);
misc_deregister(&jailhouse_misc_dev);
jailhouse_sysfs_exit(jailhouse_dev);
+ jailhouse_firmware_free();
jailhouse_pci_unregister();
root_device_unregister(jailhouse_dev);
}
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:23 AM4/19/17
to jailho...@googlegroups.com
Required for newer kernels that start to use this resource.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
configs/hikey.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/configs/hikey.c b/configs/hikey.c
index 2c859a09..646c3c9a 100644
--- a/configs/hikey.c
+++ b/configs/hikey.c
@@ -18,7 +18,7 @@
struct {
struct jailhouse_system header;
__u64 cpus[1];
- struct jailhouse_memory mem_regions[3];
+ struct jailhouse_memory mem_regions[4];
struct jailhouse_irqchip irqchips[1];
struct jailhouse_pci_device pci_devices[1];
} __attribute__((packed)) config = {
@@ -66,6 +66,13 @@ struct {

.mem_regions = {
/* MMIO (permissive) */ {
+ .phys_start = 0xf4100000,
+ .virt_start = 0xf4100000,
+ .size = 0x00008000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* MMIO (permissive) */ {
.phys_start = 0xf7000000,
.virt_start = 0xf7000000,
.size = 0x01100000,
@@ -105,7 +112,7 @@ struct {
0xffffff00, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
- .shmem_region = 2,
+ .shmem_region = 3,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
},
},
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:23 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

Replacing vunmap with a function that allows us to do more than
just vunmap whenever we free that memory. That prepares for a later
patch that exposes the hypervisor image via sysfs.

Signed-off-by: Henning Schild <henning...@siemens.com>
Tested-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
driver/main.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/driver/main.c b/driver/main.c
index 5f536a2e..7d02092e 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013-2016
+ * Copyright (c) Siemens AG, 2013-2017
* Copyright (c) Valentine Sinitsyn, 2014
*
* Authors:
@@ -277,6 +277,12 @@ static int __jailhouse_console_dump_delta(struct jailhouse_console *console,
return ret;
}

+static void jailhouse_firmware_free(void)
+{
+ vunmap(hypervisor_mem);
+ hypervisor_mem = NULL;
+}
+
int jailhouse_console_dump_delta(char *dst, unsigned int head,
unsigned int *miss)
{
@@ -505,7 +511,7 @@ error_free_cell:
jailhouse_cell_delete_root();

error_unmap:
- vunmap(hypervisor_mem);
+ jailhouse_firmware_free();
if (console)
iounmap(console);
if (clock_reg)
@@ -603,7 +609,7 @@ static int jailhouse_cmd_disable(void)

update_last_console();

- vunmap(hypervisor_mem);
+ jailhouse_firmware_free();

jailhouse_cell_delete_root();
jailhouse_enabled = false;
--
2.12.0

Jan Kiszka

unread,
Apr 19, 2017, 7:09:24 AM4/19/17
to jailho...@googlegroups.com, Henning Schild
From: Henning Schild <henning...@siemens.com>

Make the "used, dirty" firmware image visible in sysfs. The data segment
contains data that could be useful for all sorts of debugging tools.
This feature is introduced to extract code coverage information (gcov).

Signed-off-by: Henning Schild <henning...@siemens.com>
Tested-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
[Jan: remove conditionals from core_show - risk of deadlock]
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
driver/main.c | 7 ++++++-
driver/main.h | 3 ++-
driver/sysfs.c | 27 ++++++++++++++++++++++++++-
driver/sysfs.h | 4 +++-
4 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/driver/main.c b/driver/main.c
index 676365c4..deadd3a3 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -81,9 +81,9 @@ struct console_state {

DEFINE_MUTEX(jailhouse_lock);
bool jailhouse_enabled;
+void *hypervisor_mem;

static struct device *jailhouse_dev;
-static void *hypervisor_mem;
static unsigned long hv_core_and_percpu_size;
static atomic_t call_done;
static int error_code;
@@ -279,6 +279,7 @@ static int __jailhouse_console_dump_delta(struct jailhouse_console *console,

static void jailhouse_firmware_free(void)
{
+ jailhouse_sysfs_core_exit(jailhouse_dev);
vunmap(hypervisor_mem);
hypervisor_mem = NULL;
}
@@ -419,6 +420,10 @@ static int jailhouse_cmd_enable(struct jailhouse_system __user *arg)
header = (struct jailhouse_header *)hypervisor_mem;
header->max_cpus = max_cpus;

+ err = jailhouse_sysfs_core_init(jailhouse_dev, header->core_size);
+ if (err)
+ goto error_unmap;
+
/*
* ARMv8 requires to clean D-cache and invalidate I-cache for memory
* containing new instructions. On x86 this is a NOP. On ARMv7 the
diff --git a/driver/main.h b/driver/main.h
index 00ceab4f..7c9f661c 100644
--- a/driver/main.h
+++ b/driver/main.h
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013-2015
+ * Copyright (c) Siemens AG, 2013-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -19,6 +19,7 @@

extern struct mutex jailhouse_lock;
extern bool jailhouse_enabled;
+extern void *hypervisor_mem;

void *jailhouse_ioremap(phys_addr_t phys, unsigned long virt,
unsigned long size);
diff --git a/driver/sysfs.c b/driver/sysfs.c
index 6a01cbff..de25131c 100644
--- a/driver/sysfs.c
+++ b/driver/sysfs.c
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2014-2015
+ * Copyright (c) Siemens AG, 2014-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -379,6 +379,14 @@ static ssize_t remap_pool_used_show(struct device *dev,
return info_show(dev, buffer, JAILHOUSE_INFO_REMAP_POOL_USED);
}

+static ssize_t core_show(struct file *filp, struct kobject *kobj,
+ struct bin_attribute *attr, char *buf, loff_t off,
+ size_t count)
+{
+ return memory_read_from_buffer(buf, count, &off, hypervisor_mem,
+ attr->size);
+}
+
static DEVICE_ATTR_RO(console);
static DEVICE_ATTR_RO(enabled);
static DEVICE_ATTR_RO(mem_pool_size);
@@ -401,6 +409,23 @@ static struct attribute_group jailhouse_attribute_group = {
.attrs = jailhouse_sysfs_entries,
};

+static struct bin_attribute bin_attr_core = {
+ .attr.name = "core",
+ .attr.mode = S_IRUSR,
+ .read = core_show,
+};
+
+int jailhouse_sysfs_core_init(struct device *dev, size_t hypervisor_size)
+{
+ bin_attr_core.size = hypervisor_size;
+ return sysfs_create_bin_file(&dev->kobj, &bin_attr_core);
+}
+
+void jailhouse_sysfs_core_exit(struct device *dev)
+{
+ sysfs_remove_bin_file(&dev->kobj, &bin_attr_core);
+}
+
int jailhouse_sysfs_init(struct device *dev)
{
int err;
diff --git a/driver/sysfs.h b/driver/sysfs.h
index f5cdc34a..b90483cb 100644
--- a/driver/sysfs.h
+++ b/driver/sysfs.h
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2014-2015
+ * Copyright (c) Siemens AG, 2014-2017
*
* Authors:
* Jan Kiszka <jan.k...@siemens.com>
@@ -19,6 +19,8 @@ int jailhouse_sysfs_cell_create(struct cell *cell);
void jailhouse_sysfs_cell_register(struct cell *cell);
void jailhouse_sysfs_cell_delete(struct cell *cell);

+int jailhouse_sysfs_core_init(struct device *dev, size_t hypervisor_size);
+void jailhouse_sysfs_core_exit(struct device *dev);
int jailhouse_sysfs_init(struct device *dev);
void jailhouse_sysfs_exit(struct device *dev);

--
2.12.0

Henning Schild

unread,
Apr 24, 2017, 12:11:03 PM4/24/17
to jailho...@googlegroups.com, Henning Schild, Jan Kiszka
Signed-off-by: Henning Schild <henning...@siemens.com>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>

diff --git a/Documentation/gcov.txt b/Documentation/gcov.txt
new file mode 100644
--- /dev/null
+++ b/Documentation/gcov.txt
@@ -0,0 +1,50 @@
+
+Cross Compiled
+--------------
+If you have cross compiled jailhouse you will need to copy the
+jailhouse-gcov-extract tool over to your target and execute it when you want
+to collect the statistics. The sources and *.gcno-files are not required on
+the target, just on the machine where you process the data further.
+
+Using the tool, the *.gcda-files will be generated in the directory jailhouse
+was built in on your build machine. If the tool fails to create the *.gcda-
+files, make sure the base directory exists and is writeable for your user.
+
+From there copy the files back to your build host and process them further
+with higher level tools like lcov. Make sure to use gcov and other tools from
+your cross toolchain. For the above example and an ARM32 toolchain you would
+have to add "--gcov-tool arm-linux-gnueabihf-gcov" to the lcov invocation.
diff --git a/Documentation/hypervisor-configuration.md b/Documentation/hypervisor-configuration.md

Henning Schild

unread,
Apr 24, 2017, 12:12:51 PM4/24/17
to jailho...@googlegroups.com, Jan Kiszka
This version gives a short explaination of how to work in cross
build scenarios.

Henning

Am Mon, 24 Apr 2017 18:12:02 +0200
schrieb Henning Schild <henning...@siemens.com>:

Jan Kiszka

unread,
Apr 24, 2017, 3:30:05 PM4/24/17
to Henning Schild, jailho...@googlegroups.com
On 2017-04-24 18:13, Henning Schild wrote:
> This version gives a short explaination of how to work in cross
> build scenarios.

So this replaces the documentation patch in next, right?

Jan
--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Henning Schild

unread,
Apr 25, 2017, 4:30:18 AM4/25/17
to Jan Kiszka, jailho...@googlegroups.com
Am Mon, 24 Apr 2017 21:30:03 +0200
schrieb Jan Kiszka <jan.k...@siemens.com>:

> On 2017-04-24 18:13, Henning Schild wrote:
> > This version gives a short explaination of how to work in cross
> > build scenarios.
>
> So this replaces the documentation patch in next, right?

Yes. Note that i already added your Signed-off.

Henning

Jan Kiszka

unread,
Apr 25, 2017, 4:31:18 AM4/25/17
to Henning Schild, jailho...@googlegroups.com
On 2017-04-25 10:31, Henning Schild wrote:
> Am Mon, 24 Apr 2017 21:30:03 +0200
> schrieb Jan Kiszka <jan.k...@siemens.com>:
>
>> On 2017-04-24 18:13, Henning Schild wrote:
>>> This version gives a short explaination of how to work in cross
>>> build scenarios.
>>
>> So this replaces the documentation patch in next, right?
>
> Yes. Note that i already added your Signed-off.

...which is not process conforming. ;)

Jan
Reply all
Reply to author
Forward
0 new messages