processor-sdk/jailhouse.git
3 years agoREADME: Set link to jailhouse-images project master
Jan Kiszka [Sun, 11 Mar 2018 11:53:14 +0000 (04:53 -0700)]
README: Set link to jailhouse-images project

An x86 demo image is now in a good shape so that we can recommend it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoREADME: support for emtrion emCON-RZ/G1x series
Jan von Wiarda [Fri, 9 Mar 2018 08:13:56 +0000 (09:13 +0100)]
README: support for emtrion emCON-RZ/G1x series

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoREADME: support for NXP IMX8
Peng Fang [Thu, 8 Mar 2018 13:36:53 +0000 (14:36 +0100)]
README: support for NXP IMX8

Signed-off-by: Peng Fang <peng.fan@nxp.com>
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoCell configs for imx8mq EVK board.
Peng Fang [Thu, 8 Mar 2018 13:36:52 +0000 (14:36 +0100)]
Cell configs for imx8mq EVK board.

Signed-off-by: Peng Fang <peng.fan@nxp.com>
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm64: ignore SIPs used for low-power modes
Peng Fang [Thu, 8 Mar 2018 13:36:51 +0000 (14:36 +0100)]
arm64: ignore SIPs used for low-power modes

See the following reference:
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/arm-sip-service.rst

Signed-off-by: Peng Fang <peng.fan@nxp.com>
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
[Jan: fixed git whitespace warning]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoimx8mq: add UART support
Peng Fang [Thu, 8 Mar 2018 13:36:50 +0000 (14:36 +0100)]
imx8mq: add UART support

Signed-off-by: Peng Fang <peng.fan@nxp.com>
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm/arm64: Simplify bit field extractions using GET_FIELD macro
Adeel Ahmad [Tue, 6 Mar 2018 17:43:15 +0000 (22:43 +0500)]
arm/arm64: Simplify bit field extractions using GET_FIELD macro

The bit field extractions are made more readable by the use
of GET_FIELD macro, this also allows them to be mapped
directly to processor manuals. This commit also
includes a typo fix.

Signed-off-by: Adeel Ahmad <adeelahmad14@hotmail.com>
[Jan: kept "hsr" as parameter name on arm]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoDocumentation: update required QEMU version to be >= 2.8
Adeel Ahmad [Tue, 6 Mar 2018 17:30:14 +0000 (22:30 +0500)]
Documentation: update required QEMU version to be >= 2.8

The "x86 Demonstration in QEMU/KVM" section currently
lists QEMU version to be 2.7 or newer, as the
x-buggy-eim property was introduced in version 2.8,
this version won't work.

Signed-off-by: Adeel Ahmad <adeelahmad14@hotmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoREADME/FAQ: Use consistent blank-line separations
Jan Kiszka [Mon, 5 Mar 2018 17:51:44 +0000 (18:51 +0100)]
README/FAQ: Use consistent blank-line separations

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoDocumentation: supported free OSs; memory reservation through DT
Claudio Scordino [Mon, 5 Mar 2018 09:37:31 +0000 (10:37 +0100)]
Documentation: supported free OSs; memory reservation through DT

Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: Provide GET_FIELD helper macro
Jan Kiszka [Thu, 1 Mar 2018 05:59:20 +0000 (06:59 +0100)]
core: Provide GET_FIELD helper macro

This allows to extract the value of a bitfield from a variable, properly
shifted to the right for direct use.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm/arm64: Replace HSR/ESR_ISS_MASK with BIT_MASK
Jan Kiszka [Wed, 28 Feb 2018 07:49:13 +0000 (08:49 +0100)]
arm/arm64: Replace HSR/ESR_ISS_MASK with BIT_MASK

Makes the mask more readable. There is also no need for a separate
define because only HSR/ESR_ISS makes use of it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm/arm64: Reject hypercalls with wrong immediate code
Jan Kiszka [Wed, 28 Feb 2018 07:41:58 +0000 (08:41 +0100)]
arm/arm64: Reject hypercalls with wrong immediate code

Jailhouse only supports hypercalls with the immediate code 0x4a48. Avoid
interpreting calls with other codes as ours.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: Fix name of HSR ISS field
Jan Kiszka [Wed, 28 Feb 2018 07:39:23 +0000 (08:39 +0100)]
arm: Fix name of HSR ISS field

It's called ISS according to the ARM manual, not ICC.

No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: x86: Expand inmate reservation
Jan Kiszka [Sun, 18 Feb 2018 16:36:21 +0000 (17:36 +0100)]
configs: x86: Expand inmate reservation

Add further 16 MB for inmates, using it for linux-x86-demo. This helps
starting standard, larger kernels that can also be used for the root
cell.

While adjusting the two remaining AMD configs, also update their
hypervisor size which makes them compatible with linux-x86-demo again.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: Device Tree Revision for Linux inmates on emCON-RZ/G1E and emCON-RZ/G1M
Jan von Wiarda [Fri, 2 Feb 2018 07:42:28 +0000 (08:42 +0100)]
configs: Device Tree Revision for Linux inmates on emCON-RZ/G1E and emCON-RZ/G1M

This patchset removes the warnings of the latest 4.15 device tree compiler.
In addition it includes the defines of missing header files directly in the
device tree source file.

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Ruediger Fichter <ruediger.fichter@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agodocumentation: Update emCON-RZ/G debug and setup documentation files
Jan von Wiarda [Thu, 1 Feb 2018 08:08:26 +0000 (09:08 +0100)]
documentation: Update emCON-RZ/G debug and setup documentation files

-added the two new debug interfaces HSCIF and SCIFA from Renesas to the debug output documentation
-updated device specific defines in setup documentation of emcon-RZ/G

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: Add hypervisor support for Renesas SCIFA serial communication interface
Ruediger Fichter [Wed, 31 Jan 2018 13:34:09 +0000 (14:34 +0100)]
arm: Add hypervisor support for Renesas SCIFA serial communication interface

This patch adds hypervisor support for the SCIFA SCI.

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Ruediger Fichter <ruediger.fichter@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: Add inmate support for Renesas SCIFA serial communication interface
Ruediger Fichter [Wed, 31 Jan 2018 13:34:08 +0000 (14:34 +0100)]
inmates: Add inmate support for Renesas SCIFA serial communication interface

Renesas boards support different types of serial communication interfaces.
This patch adds inmate support for the SCIFA SCI.

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Ruediger Fichter <ruediger.fichter@emtrion.de>
[Jan: removed spurious change of Banana-Pi CON_DIVIDER]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: Add support for emtrion's octa-core emCON-RZ/G1H
Jan von Wiarda [Wed, 31 Jan 2018 13:34:07 +0000 (14:34 +0100)]
configs: Add support for emtrion's octa-core emCON-RZ/G1H

Introduce Jailhouse support for emtrion's octa-core emCON-RZ/G1H.

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: Add Renesas SCIFA as console type
Ruediger Fichter [Wed, 31 Jan 2018 13:34:10 +0000 (14:34 +0100)]
core: Add Renesas SCIFA as console type

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Ruediger Fichter <ruediger.fichter@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: arm: fix erroneous interrupt stack address
Ralf Ramsauer [Mon, 29 Jan 2018 14:48:51 +0000 (15:48 +0100)]
inmates: arm: fix erroneous interrupt stack address

The stack pointer must point to the top of the stack. Until now, it
erroneously pointed to the bottom of the stack.

Luckily this didn't lead to any problems so far, as the region before
the stack bottom was padded with zeroes.

Let's change the type of the irq_stack from u32 to u8. This allows us to
use simple stack top calculation with sizeof(), and without a nasty
ARRAY_SIZE workaround (which we would need for u32, and which we don't
for inmates).

Fixes: 9ee8e141893896 ("arm: basic inmates demos")
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: define PAGE_SIZE for ARM architectures
Ralf Ramsauer [Mon, 29 Jan 2018 14:48:50 +0000 (15:48 +0100)]
inmates: define PAGE_SIZE for ARM architectures

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: dts: align comment header with other device trees
Ralf Ramsauer [Sat, 27 Jan 2018 15:17:50 +0000 (16:17 +0100)]
configs: dts: align comment header with other device trees

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: arm64: common config header
Ralf Ramsauer [Sat, 27 Jan 2018 15:17:20 +0000 (16:17 +0100)]
configs: arm64: common config header

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: arm: common config header
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:48 +0000 (16:03 +0100)]
configs: arm: common config header

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: x86: common config header
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:47 +0000 (16:03 +0100)]
configs: x86: common config header

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: dts: fix references of inmate configs in device tree sources
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:46 +0000 (16:03 +0100)]
configs: dts: fix references of inmate configs in device tree sources

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: fix references of inmate configurations
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:45 +0000 (16:03 +0100)]
inmates: fix references of inmate configurations

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoREADME: amend configuration directory
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:44 +0000 (16:03 +0100)]
README: amend configuration directory

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoDocumentation: maintain changes to config directory structure
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:43 +0000 (16:03 +0100)]
Documentation: maintain changes to config directory structure

Also maintain documentation. I did not maintain the LJ article.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfig: dts: move device tree sources to arch subdirs
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:42 +0000 (16:03 +0100)]
config: dts: move device tree sources to arch subdirs

We already moved system/inmate configurations to arch subdirs, so let's
also move device tree sources.

For the moment, we only need to compile them in case of non-x86 arch.
Describe that in configs/Makefile. This also saves a device tree
specific Makefile.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
[Jan: avoid conditional in Makefile]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: move system and inmate configs to arch subdirs
Ralf Ramsauer [Sat, 27 Jan 2018 15:03:41 +0000 (16:03 +0100)]
configs: move system and inmate configs to arch subdirs

At the moment, we always build all configurations, independant of our
targetted architecture. Let's only build configurations that are
relevant. This slightly speeds up compilation and makes compile output
as well as the configs/ directory significantly clearer.

Leave device tree sources at their place for the moment, and move them
in a separate commit.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agogitignore: always ignore cell files
Ralf Ramsauer [Fri, 26 Jan 2018 20:23:43 +0000 (21:23 +0100)]
gitignore: always ignore cell files

We already ignore .dtb files independent of their location, so we can
also ignore .cell files independent of their location.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm-common: Reorder if conditions to avoid negation
Jan Kiszka [Fri, 26 Jan 2018 18:18:00 +0000 (19:18 +0100)]
arm-common: Reorder if conditions to avoid negation

Just a style thing: save one negation to improve readability.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: arm: provide correct sender ID when reinjecting SGIs
Ralf Ramsauer [Fri, 26 Jan 2018 09:43:24 +0000 (10:43 +0100)]
core: arm: provide correct sender ID when reinjecting SGIs

When receiving a SGI, GICv2 provides some bits for the sender ID. Fill
them correctly.

Most OSes disregard those bits, so this wasn't noticed yet.
Nevertheless, this should be implemented in order to stick to the GICv2
specification.

GICv3 does not reinject sender IDs.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoirqchip: minor cosmetic changes
Ralf Ramsauer [Fri, 26 Jan 2018 09:43:23 +0000 (10:43 +0100)]
irqchip: minor cosmetic changes

Long statements require ugly line-wraps to prevent overlong lines.

This shortens the reocurring pattern "cpu_data->pending_irqs..." pattern
by directly pointing to pending_irqs.

... And makes code more readable.

No functional change.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: consolidate fields of pending_irqs to a common struct
Ralf Ramsauer [Fri, 26 Jan 2018 09:43:22 +0000 (10:43 +0100)]
arm: consolidate fields of pending_irqs to a common struct

percpu.h of ARM and ARM64 duplicates many things. This patch
consolidates fields for pending IRQs and prepares for extending the
structure by further members.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: arm: correct decoding of SGIs
Ralf Ramsauer [Fri, 26 Jan 2018 09:43:21 +0000 (10:43 +0100)]
inmates: arm: correct decoding of SGIs

If an IRQ is a SGI, bits 10-12 in the IAR of a GICv2 encode the
requesting CPU.

So far, Jailhouse doesn't set those bits (while it should, refer GICv2
spec!) so we didn't get hurt.  Nevertheless, this hits us when issuing
SGIs on bare-metal applications without jailhouse.  This patch properly
decodes SGI IRQ numbers by applying a mask to read_ack functions.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
[Jan: Removed unrelated hunk from header]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: remove superfluous include guards
Ralf Ramsauer [Fri, 26 Jan 2018 09:43:20 +0000 (10:43 +0100)]
arm: remove superfluous include guards

We don't need include guards here.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agodriver: Avoid dependency on additional kernel symbol exports
Jan Kiszka [Sun, 21 Jan 2018 16:32:32 +0000 (17:32 +0100)]
driver: Avoid dependency on additional kernel symbol exports

If CONFIG_KALLSYMS_ALL is enabled, we can get symbol addresses that the
upstream kernel does not export via kallsyms_lookup_name. We can use
this to avoid a number of kernel patches. Specifically, x86 can become
patch-free once all guest-side support is merged and ivshmem-net is
built as external module (or merged as well).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agodocumentation: Update documentation for emCON-RZ/G1x modules
Jan von Wiarda [Mon, 15 Jan 2018 12:59:18 +0000 (13:59 +0100)]
documentation: Update documentation for emCON-RZ/G1x modules

Since we are using fixed clocks in the inmates' dts there is no need to
patch the Linux inmate kernel anymore.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: Use fixed-clock in Linux inmates' dts on emCON-RZ/G1x
Jan von Wiarda [Mon, 15 Jan 2018 12:59:17 +0000 (13:59 +0100)]
inmates: Use fixed-clock in Linux inmates' dts on emCON-RZ/G1x

By using fixed clocks in the inmates' dts we avoid that the Linux inmate crashes
when accessing the Clock Pulse Generator. This way we get rid of the Kernel changes
we were using so far.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: Added missing LVDS area to emCON-RZ/G1M root cell config
Jan von Wiarda [Mon, 15 Jan 2018 12:59:16 +0000 (13:59 +0100)]
configs: Added missing LVDS area to emCON-RZ/G1M root cell config

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: Corrected GICD and GICC base address
Jan von Wiarda [Mon, 15 Jan 2018 12:59:15 +0000 (13:59 +0100)]
inmates: Corrected GICD and GICC base address

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86, arm: Move JAILHOUSE_BORROW_ROOT_PT into jailhouse_header.h
Jan Kiszka [Sun, 7 Jan 2018 14:09:32 +0000 (15:09 +0100)]
x86, arm: Move JAILHOUSE_BORROW_ROOT_PT into jailhouse_header.h

JAILHOUSE_BORROW_ROOT_PT and JAILHOUSE_BASE belong together logically,
and they used to be prior to 646233947717. Restore this by moving the
former also into asm/jailhouse_header.h. This is the expected location
for it because JAILHOUSE_BORROW_ROOT_PT is only relevant during the
setup process that jailhouse_header.h is used for.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoDocumentation: Remove reference to ACPI
Jan Kiszka [Sun, 7 Jan 2018 14:05:48 +0000 (15:05 +0100)]
Documentation: Remove reference to ACPI

ACPI interpretation is long gone from the hypervisor core.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agotools: cell-linux: Tune x86 decompression factor based on compression method
Jan Kiszka [Sun, 7 Jan 2018 10:30:35 +0000 (11:30 +0100)]
tools: cell-linux: Tune x86 decompression factor based on compression method

On x86, we can find out which compression method was used. So we are
able to tune the decompression factor automatically according to this.

Unfortunately, the ARM 32-bit kernel does not expose the payload address
and, thus, does not allow to apply the same approach.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agotools: cell-linux: Make kernel decompression factor configurable
Jan Kiszka [Sun, 7 Jan 2018 07:45:22 +0000 (08:45 +0100)]
tools: cell-linux: Make kernel decompression factor configurable

The required factor depends on the chosen compression method, and that
may vary. Have a large factor to account for aggressive compressions
(and increased memory needs during decompression) will work - as long as
there is enough memory assigned to the cell. Using a smaller default
will address this but break if the user chooses a better compression
method.

Let's make this factor configurable in order to give the user some
control in case our default should not work.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
3 years agotools: cell-linux: Use minimal decompression space for ARM64
Jan Kiszka [Sun, 7 Jan 2018 07:43:22 +0000 (08:43 +0100)]
tools: cell-linux: Use minimal decompression space for ARM64

Factor out a default decompression factor for ARM because ARM64 does not
perform any compression so far, thus has a factor of 1 only. This allows
for more compact non-root Linux cell layout during load.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
3 years agoFAQ: handling inmates that do not reply to requests
Claudio Scordino [Thu, 4 Jan 2018 09:49:59 +0000 (10:49 +0100)]
FAQ: handling inmates that do not reply to requests

Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
[Jan: tiny wording fix]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoRevert "core: Only park CPUs in cell_set_loadable if really necessary"
Jan Kiszka [Mon, 1 Jan 2018 19:56:01 +0000 (20:56 +0100)]
Revert "core: Only park CPUs in cell_set_loadable if really necessary"

This reverts commit ed4c78161bb8966ffaebbaa7613bf195077e2d29.

We do need the parking in order to resume the target cell's CPUs. Since
that commit, duplicate "cell shutdown" caused the target cell to spin
in suspension.

Leave a comment in the code as well to avoid future confusion.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoBump version number
Jan Kiszka [Sat, 23 Dec 2017 14:01:12 +0000 (15:01 +0100)]
Bump version number

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: Fix AMD Seattle configurations
Jan Kiszka [Fri, 22 Dec 2017 22:08:39 +0000 (23:08 +0100)]
configs: Fix AMD Seattle configurations

The Seattle configs had a serious bug: they granted the root cell full
access to the hypervisor memory. This caused spurious lock-ups and broke
the virtual hypervisor console consistently.

Fix this and also reorganize the layout. For this, one has to know that
the root cell Linux apparently has some business with the top most RAM.
So, leave the last 256M to that cell and put the hypervisor and IVSHMEM
below that. Lower down, we can place the non-root cell and the bare-
metal demos.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: Enable debug console for non-root Linux cell demos
Jan Kiszka [Tue, 19 Dec 2017 19:02:21 +0000 (20:02 +0100)]
configs: Enable debug console for non-root Linux cell demos

Give our demo inmates the necessary rights so that we can test the Linux
driver.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Make PM timer address optional
Jan Kiszka [Wed, 13 Dec 2017 13:20:04 +0000 (14:20 +0100)]
x86: Make PM timer address optional

There might be systems without it, and then we should still be able to
start the hypervisor and cells that are fine without it as well - such
as Linux.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoscripts: Update header_check to scan also the relocated headers
Jan Kiszka [Wed, 13 Dec 2017 06:50:17 +0000 (07:50 +0100)]
scripts: Update header_check to scan also the relocated headers

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: remove hypervisor-local include directory
Ralf Ramsauer [Tue, 12 Dec 2017 20:40:49 +0000 (21:40 +0100)]
inmates: remove hypervisor-local include directory

There's no more need for it. And that's it, inmates no more depend on
pure hypervisor headers.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates, arm64: provide own sysregs.h
Ralf Ramsauer [Tue, 12 Dec 2017 20:40:48 +0000 (21:40 +0100)]
inmates, arm64: provide own sysregs.h

ARM inmates make use of hypervisor's sysregs accessors and helpers. In
order to entirely decouple the hypervisor code from inmate code, let's
duplicate accessors.

And that's it, we just need to define accessors, compiler makes the
rest.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Antonios Motakis <antonios.motakis@huawei.com>
Cc: Nikhil Devshatwar <nikhil.nd@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates, arm: provide own sysregs.h
Ralf Ramsauer [Tue, 12 Dec 2017 20:40:47 +0000 (21:40 +0100)]
inmates, arm: provide own sysregs.h

ARM inmates make use of hypervisor's sysregs accessors and helpers. In
order to entirely decouple the hypervisor code from inmate code, let's
duplicate some of those definitions, but only those that are really in
use.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Antonios Motakis <antonios.motakis@huawei.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: move hypervisor configuration to include/jailhouse/config.h
Ralf Ramsauer [Tue, 12 Dec 2017 20:40:46 +0000 (21:40 +0100)]
core: move hypervisor configuration to include/jailhouse/config.h

Keep dual-licensed code and/or headers shared between components at one
single place. Also maintain documentation and .gitignore.

Both, inmates and hypervisor need those definitions. Don't store the
global config.h somewhere deep inside 'hypervisor/' any longer.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
[Jan: adjust also emcon-rz doc, FAQ and build-all-configs.sh]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: move cell-config.h to global include directory
Ralf Ramsauer [Tue, 12 Dec 2017 20:40:45 +0000 (21:40 +0100)]
core: move cell-config.h to global include directory

Keep dual-licensed code and/or headers shared between components at one
single place.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: move hypercall interface to global include directory
Ralf Ramsauer [Tue, 12 Dec 2017 20:40:44 +0000 (21:40 +0100)]
core: move hypercall interface to global include directory

Keep dual-licensed code and/or headers shared between components at one
single place.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Cc: Antonios Motakis <antonios.motakis@huawei.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
[Jan: updated also header_check with new include paths]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86, configs: Deny direct access to port 80
Jan Kiszka [Sat, 2 Dec 2017 07:20:02 +0000 (08:20 +0100)]
x86, configs: Deny direct access to port 80

Apparently, there are systems that can crash or otherwise get badly
influenced by writing port 80 (see Linux commit 99f85a28a78e and
CVE-2017-1000407). Intercept those accesses and simply ignore them to be
safe. All affected configs and the generator template are updated as
well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoDocumentation: Update x86 Communication Region description
Jan Kiszka [Tue, 28 Nov 2017 05:22:31 +0000 (06:22 +0100)]
Documentation: Update x86 Communication Region description

The platform information recently gained some new fields. List them.
Reformat the generic region as well for visual consistency.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: Declare cmdline buffer
Jan Kiszka [Sun, 26 Nov 2017 11:25:23 +0000 (12:25 +0100)]
inmates: Declare cmdline buffer

It might be overwritten by an inmate, therefore it is a global symbol.
Noticed by sparse.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Mask out VMX and SVM from non-root cell cpuid
Jan Kiszka [Sat, 25 Nov 2017 15:17:11 +0000 (16:17 +0100)]
x86: Mask out VMX and SVM from non-root cell cpuid

We do not support nested virtualization, so don't make the guests
believe anything different.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: x86: Enhance Linux setup data structure
Jan Kiszka [Fri, 24 Nov 2017 07:01:12 +0000 (08:01 +0100)]
inmates: x86: Enhance Linux setup data structure

Expand the Jailhouse-specific setup data structure we pass to the Linux
kernel on boot by the calibrated TSC and APIC timer frequencies. Also
switch the type to a value we are going to reserve officially in the
upstream kernel, rather than using the large magic value.

Although this is a change that should normally increase the version of
the struct, we keep it untouched as we didn't release the previous
structure version yet. Specifically, there is no official kernel out
there expecting the old structure.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: x86: Use pre-calibrated TSC and APIC timer frequencies
Jan Kiszka [Fri, 24 Nov 2017 06:33:18 +0000 (07:33 +0100)]
inmates: x86: Use pre-calibrated TSC and APIC timer frequencies

The Communication Region now provides these values, so we can drop the
calibration for the inmate library. The APIC timer frequency is only
available if there is no TSC deadline timer support, but then we use the
latter anyway.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: x86: Add TSC deadline timer support
Jan Kiszka [Fri, 24 Nov 2017 06:25:59 +0000 (07:25 +0100)]
inmates: x86: Add TSC deadline timer support

Use the TSC deadline timer when available. This avoids having to
calibrate the APIC timer in those cases.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86, driver, tools: Pass TSC and APIC timer frequency calibration to non-root cells
Jan Kiszka [Fri, 24 Nov 2017 06:14:27 +0000 (07:14 +0100)]
x86, driver, tools: Pass TSC and APIC timer frequency calibration to non-root cells

This avoids that non-root cells have to calibrate TSC and - provided
there is no TSC deadline timer support - APIC timer frequencies
themselves. Rather we now either use statically configured values from
the system configuration or, of those or 0, pick them up from the root
cell during hypervisor start. Then the values are simply forwarded via
the Communication Region to all x86 non-root cells.

This requires another patch to the root-cell Linux to export
lapic_timer_frequency for us.

CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates, tools: Avoid warnings of objtool
Jan Kiszka [Fri, 24 Nov 2017 06:03:23 +0000 (07:03 +0100)]
inmates, tools: Avoid warnings of objtool

Latest 4.15 kernel comes with the ORC unwinder and, along that, a
number of build-time checks on object files. These are tailored for the
kernel and do not go well with both our inmates and the userspace tools,
e.g.:

.../jailhouse.o: warning: objtool: read_file() falls through to next function parse_cell_id()
.../jailhouse.o: warning: objtool: help() falls through to next function open_dev()
.../jailhouse.o: warning: objtool: open_dev() falls through to next function cell_simple_cmd()
(because of lacking knowledge about no-return functions)

Disable them for x86 inmates, currently the only affected arch, and the
tools.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agodriver: Account for upcoming changes to device tree overlay API
Jan Kiszka [Wed, 22 Nov 2017 07:16:24 +0000 (08:16 +0100)]
driver: Account for upcoming changes to device tree overlay API

In 4.15, of_overlay_create and of_overlay_destroy were refactored to
of_overlay_apply and of_overlay_remove, also changing the parameters and
return values. Prepare for this change while staying compatible with
older kernels.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm-common: Force enabling the clock gate of the debug console
Ruediger Fichter [Mon, 20 Nov 2017 10:51:21 +0000 (11:51 +0100)]
arm-common: Force enabling the clock gate of the debug console

Enable the clock gate of the debug console, even in the case it has been turned off i.e. because the root cell is not using the UART.

Signed-off-by: Ruediger Fichter <ruediger.fichter@emtrion.de>
Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
[Jan: perform enabling only if register is non-zero]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agodocumentation: Instructions on how to setup Jailhouse on emCON-RZ/G from emtrion
Jan von Wiarda [Fri, 17 Nov 2017 10:44:20 +0000 (11:44 +0100)]
documentation: Instructions on how to setup Jailhouse on emCON-RZ/G from emtrion

Step-by-step instructions on how to setup Jailhouse on emCON-RZ/G1E and emCON-RZ/G1M from emtrion.

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: Jailhouse support for Renesas RZ/G1M (emCON-RZ/G1M from emtrion)
Jan von Wiarda [Fri, 17 Nov 2017 10:44:19 +0000 (11:44 +0100)]
configs: Jailhouse support for Renesas RZ/G1M (emCON-RZ/G1M from emtrion)

This patch adds:

     - root cell configuration
     - UART demo configuration
     - Linux demo configuration
     - Inmate Device Tree for emCON-RZ/G1M

for Renesas RZ/G1M (emCON-RZ/G1M from emtrion).

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: Jailhouse support for Renesas RZ/G1E (emCON-RZ/G1E from emtrion)
Ruediger Fichter [Fri, 17 Nov 2017 10:44:18 +0000 (11:44 +0100)]
configs: Jailhouse support for Renesas RZ/G1E (emCON-RZ/G1E from emtrion)

This patch adds:

     - root cell configuration
     - UART demo configuration
     - Linux demo configuration
     - Inmate Device Tree for emCON-RZ/G1E

for Renesas RZ/G1E (emCON-RZ/G1E from emtrion).

Signed-off-by: Ruediger Fichter <ruediger.fichter@emtrion.de>
Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoconfigs: linux-x86-demo: Make UART IRQs available to cell
Jan Kiszka [Sun, 12 Nov 2017 10:32:50 +0000 (11:32 +0100)]
configs: linux-x86-demo: Make UART IRQs available to cell

Assigned IRQ 3 and 4 of the legacy UARTs to the non-root Linux cell so
that IRQ-driven consoles etc. work.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates/tools: Rework setup_data structure for non-root Linux
Jan Kiszka [Sun, 12 Nov 2017 10:27:00 +0000 (11:27 +0100)]
inmates/tools: Rework setup_data structure for non-root Linux

This does two things in one to avoid breaking the interface twice:

- Add current and compatible version fields so that Linux can find out
  if it can process the structure and if there are eventually new fields
  available.

- Add a standard_ioapic field that tells Linux if the IOAPIC at
  0xfec00000 is available and should be mapped.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agotools: jailhouse-cell-linux: Obtain irqchips from config
Jan Kiszka [Sun, 12 Nov 2017 10:25:05 +0000 (11:25 +0100)]
tools: jailhouse-cell-linux: Obtain irqchips from config

Will soon be used to find out if the standard IOAPIC is available for
non-root Linux cell.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agotools: Leave more space between kernel and initrd on x86
Jan Kiszka [Sun, 12 Nov 2017 09:55:53 +0000 (10:55 +0100)]
tools: Leave more space between kernel and initrd on x86

Specifically with smaller and highly compressed images, 5 times the
uncompressed size was too few to avoid overwriting the initrd. Doubling
it helps.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Implement proper cell reset for the IOAPIC
Jan Kiszka [Sun, 12 Nov 2017 07:49:27 +0000 (08:49 +0100)]
x86: Implement proper cell reset for the IOAPIC

Analogously to the ARM GIC, mask all cell pins on reset. That includes
cell startup, so we can remove the explicit masking from
ioapic_cell_init.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Remove cell iteration from ioapic_handover
Jan Kiszka [Sun, 12 Nov 2017 07:47:30 +0000 (08:47 +0100)]
x86: Remove cell iteration from ioapic_handover

Since we are only shutting down when all non-root cells are destroyed,
we no longer need to iterate over them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoAdding the sram region to HiKey config file.
Mahdi Amiri K [Fri, 10 Nov 2017 06:10:06 +0000 (19:10 +1300)]
Adding the sram region to HiKey config file.

The sram@fff80000 region for Hi6220-HiKey was missing in the
configuration file and was causing errors in Linux kernel 4.9 used for
Linaro Reference Platform Build (RPB).

Signed-off-by: Mahdi Amiri K <mahdi@cs.otago.ac.nz>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates: Inmate specific defines for emCON-RZ/G COMs from emtrion
Jan von Wiarda [Mon, 6 Nov 2017 15:16:59 +0000 (16:16 +0100)]
inmates: Inmate specific defines for emCON-RZ/G COMs from emtrion

This patch adds inmate specific defines for computer-on-modules emCON-RZ/G1E and emCON-RZ/G1M from emtrion.

Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm-common: Jailhouse support for Renesas SH-Mobile Serial Communication Interface
Ruediger Fichter [Mon, 6 Nov 2017 15:16:58 +0000 (16:16 +0100)]
arm-common: Jailhouse support for Renesas SH-Mobile Serial Communication Interface

This patch adds support for Renesas-specific Serial Communication Interface (SCI) UART.

Signed-off-by: Ruediger Fichter <ruediger.fichter@emtrion.de>
Signed-off-by: Jan von Wiarda <jan.vonwiarda@emtrion.de>
[Jan: removed duplicate GPL notice in inmates/.../uart-hscif.c]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Ignore accesses to unassigned IOAPIC pins
Jan Kiszka [Mon, 6 Nov 2017 06:42:19 +0000 (07:42 +0100)]
x86: Ignore accesses to unassigned IOAPIC pins

Do not stop a cell CPU that accesses an IOAPIC redirection table entry
for a pin that it does not own. Rather ignore the access, returning 0 on
reads. This behavior is in line with how we handle GIC accesses on ARM.
It allows guests like Linux to keep their usual IOAPIC initialization
code as-is which may first of all masks all pins of the chip.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Grant read access to reserved IOAPIC registers
Jan Kiszka [Mon, 6 Nov 2017 06:37:58 +0000 (07:37 +0100)]
x86: Grant read access to reserved IOAPIC registers

Depending on the IOAPIC version, guests may try to read further
information from them. Reading is harmless, so permit the access, even
simplifying the code.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Add support for PAE guest paging mode
Jan Kiszka [Sat, 4 Nov 2017 20:02:11 +0000 (21:02 +0100)]
x86: Add support for PAE guest paging mode

This completes the guest paging support with the last missing mode: PAE.
While most guests should not use this legacy mode anymore, at least
Zephyr does. Moreover, supporting this last missing mode allows to drop
the error handling around vcpu_get_guest_paging_structs.

The implementation is complicated on Intel because these CPUs cache the
page directory pointer table in registers, and we can't use the generic
reading from guest memory. In contrast, AMD performs no such caching.
Therefore, we have to use a vendor-specific get_entry handler for the
top level paging.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: vmx: Add support for MMIO while paging is disabled
Jan Kiszka [Sat, 4 Nov 2017 19:52:17 +0000 (20:52 +0100)]
x86: vmx: Add support for MMIO while paging is disabled

Aligns vmx with svm.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Drop realmode_paging description
Jan Kiszka [Sat, 4 Nov 2017 19:51:15 +0000 (20:51 +0100)]
x86: Drop realmode_paging description

Can now be encoded by setting root_paging to NULL.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: Allow to declare paging disabled via guest_paging_structures
Jan Kiszka [Sat, 4 Nov 2017 19:43:10 +0000 (20:43 +0100)]
core: Allow to declare paging disabled via guest_paging_structures

This simplifies the implementation of non-paged mode for the only user
of paging_get_guest_pages that passes non-NULL guest_paging_structures,
namely x86.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agocore: Reindent paging_gvirt2gphys
Jan Kiszka [Sat, 4 Nov 2017 19:41:13 +0000 (20:41 +0100)]
core: Reindent paging_gvirt2gphys

No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Fix arch_cpu_restore for PCID enabled systems
Jan Kiszka [Wed, 1 Nov 2017 15:56:45 +0000 (16:56 +0100)]
x86: Fix arch_cpu_restore for PCID enabled systems

Reorder reloading of cr3 and cr4 in case the latter enables PCID (which
Jailhouse does not use) and cr3 should be fully evaluated under that
feature.

Fixes a protection fault when disabling Jailhouse on PCID-enabled
systems (since kernel 4.14).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Fix general protection fault on restoring TR
Jan Kiszka [Wed, 1 Nov 2017 14:48:42 +0000 (15:48 +0100)]
x86: Fix general protection fault on restoring TR

arch_cpu_restore can run concurrently on multiple CPUs, but our
modifications to the GDT in order to reload Linux TR requires that a
couple of instructions run atomically. Namely, loading TR will set the
busy flag in the descriptor again which may race with another CPU just
trying to load from that descriptor as well. Putting everything under a
spinlock resolves the race.

The effect of this bug were sporadic general protection faults (#13)
while disabling Jailhouse or when enabling it failed.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoinmates, configs, docs: x86: Locate inmates at address 0
Jan Kiszka [Tue, 31 Oct 2017 16:36:11 +0000 (17:36 +0100)]
inmates, configs, docs: x86: Locate inmates at address 0

This simplifies the startup code and avoids having to specify the load
address explicitly, aligning x86 with ARM.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Export PCI mmconfig base address to Linux inmates
Otavio Pontes [Mon, 30 Oct 2017 21:33:32 +0000 (14:33 -0700)]
x86: Export PCI mmconfig base address to Linux inmates

In order to access the PCI express extended configuration space, a linux
inmate needs to have access to the PCI mmconfig base address. As inmates
doesn't have access to this information using ACPI, we need to export it
using the cell comm_region.

Note that the updates in Linux kernel used as inmate are also necessary
in order to use the exported value as the PCI mmconfig base address.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoREADME: use icon for webchat link
Henning Schild [Fri, 20 Oct 2017 09:25:27 +0000 (11:25 +0200)]
README: use icon for webchat link

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86, configs: Make CPU reset address configurable
Jan Kiszka [Sun, 22 Oct 2017 09:24:33 +0000 (11:24 +0200)]
x86, configs: Make CPU reset address configurable

Analogously to ARM, this makes the reset address of x86 CPUs definable
via jailhouse_cell_desc.cpu_reset_address. In order to keep the existing
demo inmates alive, all related config files define cpu_reset_address to
0xffff0 which was hard-coded into the hypervisor so far.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agox86: Relocate parking code page
Jan Kiszka [Fri, 20 Oct 2017 16:31:38 +0000 (18:31 +0200)]
x86: Relocate parking code page

This step prepares for configurable cell reset addresses. In order to
enable them, we need a stable parking code address so that we do not
need to generate per-cell mappings for this purpose.

Simply place the parking loop at address 0. Use a regular SIPI vector 0
for resetting the affected CPUs. This means on Intel that we have to
issue the DEBUGCTL reset separately in vcpu_park because we no longer
take the APIC_BSP_PSEUDO_SIPI path.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>