[PATCH] tools: jailhouse: widen space for cell state

2018-05-07 Thread Ralf Ramsauer
"Comm ABI mismatch" needs a bit more space. Signed-off-by: Ralf Ramsauer --- tools/jailhouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/jailhouse.c b/tools/jailhouse.c index 74029bac..58b02e23 100644 --- a/tools/jailhouse.c

[PATCH v5 04/12] inmates: implement arch_disable_irqs()

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer Signed-off-by: Jan Kiszka --- inmates/lib/arm/include/arch/inmate.h | 5 + inmates/lib/arm64/include/arch/inmate.h | 5 + inmates/lib/x86/inmate.h| 5 + 3 files changed, 15

[PATCH v5 11/12] inmates: use halt() in demos

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer Signed-off-by: Jan Kiszka --- inmates/demos/arm/gic-demo.c | 3 +-- inmates/demos/x86/ioapic-demo.c | 3 +-- inmates/demos/x86/ivshmem-demo.c | 2 +- inmates/demos/x86/pci-demo.c | 3 +-- 4 files

[PATCH v5 02/12] core, driver: add new cell state JAILHOUSE_CELL_FAILED_COMM_REV

2018-05-07 Thread Ralf Ramsauer
A cell may set this state if its internal ABI of the communication region is incompatibel to the one provided by the hypervisor. Signed-off-by: Ralf Ramsauer Signed-off-by: Jan Kiszka --- driver/sysfs.c| 2 ++

[PATCH v5 07/12] inmates: x86: move stop label to the top

2018-05-07 Thread Ralf Ramsauer
We will never return from c_entry. Make it clear on x86 by moving the stop label to the top of the assembly code. Signed-off-by: Ralf Ramsauer Signed-off-by: Jan Kiszka --- inmates/lib/x86/header-32.S | 11 +--

[PATCH v5 00/12] Revision communication region ABI

2018-05-07 Thread Ralf Ramsauer
Hi, ABI changes of the communication region can not be detected by inmates at the moment. Let's introduce some magic and revision field at the beginning of the page to signal ABI changes. This will help us if we change the ABI at a later point in time. Ralf since v4: - Move the cell state

[PATCH v5 06/12] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Ralf Ramsauer
Don't jump directly to inmate_main from assembly, jump to c_entry. At the moment, c_entry does nothing else than jumping to inmate_main and stop the machine if inmate_main returns. Later we can use c_entry to do platform independant setup/checks. Signed-off-by: Ralf Ramsauer

[PATCH v5 09/12] configs: arm: add comm_region to all inmates

2018-05-07 Thread Ralf Ramsauer
comm_region will become mandatory for all of our inmates. On x86, we already use the communication region to pass certain platform specific information to guests. So let's do this on all ARM architectures as well. This patch is a preparation for that. Let's use guest paddr 0x8000 (2GiB) for

[PATCH v5 10/12] inmates: check communication region ABI version

2018-05-07 Thread Ralf Ramsauer
Or fail by setting the cell's state and halt. Signed-off-by: Ralf Ramsauer Signed-off-by: Jan Kiszka --- inmates/lib/setup.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inmates/lib/setup.c

[PATCH v5 12/12] Documentation: document new communication region fields

2018-05-07 Thread Ralf Ramsauer
Freeze the fields "Signature", "ABI Revision" and "Cell State". Future changes of the ABI must not modify their offsets. Signed-off-by: Ralf Ramsauer [Jan: Clarify value and semantic of ABI revision] [Ralf: amend commit message] ---

[PATCH v5 08/12] inmates: implement memcmp

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer Signed-off-by: Jan Kiszka --- inmates/lib/inmate_common.h | 1 + inmates/lib/string.c| 10 ++ 2 files changed, 11 insertions(+) diff --git a/inmates/lib/inmate_common.h

[PATCH v5 03/12] inmates: implement halt()

2018-05-07 Thread Ralf Ramsauer
We will enter this function if we hit unrecoverable state. Signed-off-by: Ralf Ramsauer Signed-off-by: Jan Kiszka --- inmates/lib/arm-common/include/inmate.h | 6 ++ inmates/lib/x86/inmate.h| 6 ++ 2 files

[PATCH v5 01/12] core: comm_region: Add magic and ABI revision to comm_region

2018-05-07 Thread Ralf Ramsauer
Changes to the ABI of the communication region might break inmates without noticing. Add the magic JHCOMM together with the ABI version as a preamble of the structure. The location signature, revision and cell_state are frozen from now on: their location will be stable in future. Put those three

Re: [PATCH v4 02/12] Documentation: document new communication region fields

2018-05-07 Thread Jan Kiszka
On 2018-05-07 21:47, Ralf Ramsauer wrote: > On 05/07/2018 07:50 PM, Jan Kiszka wrote: >> On 2018-05-07 18:40, Ralf Ramsauer wrote: >>> Signed-off-by: Ralf Ramsauer >>> --- >>> Documentation/hypervisor-interfaces.txt | 7 ++- >>> 1 file changed, 6

Re: [PATCH v4 02/12] Documentation: document new communication region fields

2018-05-07 Thread Ralf Ramsauer
On 05/07/2018 07:50 PM, Jan Kiszka wrote: > On 2018-05-07 18:40, Ralf Ramsauer wrote: >> Signed-off-by: Ralf Ramsauer >> --- >> Documentation/hypervisor-interfaces.txt | 7 ++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git

[siemens/jailhouse] e7780f: core: comm_region: Add magic and ABI revision to c...

2018-05-07 Thread GitHub
Branch: refs/heads/next Home: https://github.com/siemens/jailhouse Commit: e7780fcfd08893775d60352adbc6f56d281d5ea3 https://github.com/siemens/jailhouse/commit/e7780fcfd08893775d60352adbc6f56d281d5ea3 Author: Ralf Ramsauer Date: 2018-05-07

Re: [PATCH v4 02/12] Documentation: document new communication region fields

2018-05-07 Thread Jan Kiszka
On 2018-05-07 18:40, Ralf Ramsauer wrote: > Signed-off-by: Ralf Ramsauer > --- > Documentation/hypervisor-interfaces.txt | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/Documentation/hypervisor-interfaces.txt >

Re: Inter-cell communication on BPM1

2018-05-07 Thread Henning Schild
Am Mon, 7 May 2018 15:54:35 +0200 schrieb "[ext] Jan Kiszka" : > On 2018-05-07 15:48, Assila Belhouichet wrote: > > Hi all, > > > > i reproduced the patchs that Henning provided for testing the > > intercell communication on the bananapi, everything was okay until > > i

[PATCH v4 02/12] Documentation: document new communication region fields

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- Documentation/hypervisor-interfaces.txt | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/hypervisor-interfaces.txt b/Documentation/hypervisor-interfaces.txt index 8dd58750..2dcb7d74 100644

Re: [PATCH v3 02/12] Documentation: document new communication region fields

2018-05-07 Thread Ralf Ramsauer
On 05/07/2018 06:29 PM, Jan Kiszka wrote: > On 2018-05-07 18:08, Ralf Ramsauer wrote: >> Signed-off-by: Ralf Ramsauer >> --- >> Documentation/hypervisor-interfaces.txt | 17 +++-- >> 1 file changed, 11 insertions(+), 6 deletions(-) >> >> diff --git

Re: [PATCH v3 00/12] Revision communication region ABI

2018-05-07 Thread Jan Kiszka
On 2018-05-07 18:08, Ralf Ramsauer wrote: > Hi, > > ABI changes of the communication region can not be detected by inmates at the > moment. Let's introduce some magic and revision field at the beginning of the > page to signal ABI changes. > > This will help us if we change the ABI at a later

Re: [PATCH v3 02/12] Documentation: document new communication region fields

2018-05-07 Thread Jan Kiszka
On 2018-05-07 18:08, Ralf Ramsauer wrote: > Signed-off-by: Ralf Ramsauer > --- > Documentation/hypervisor-interfaces.txt | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/Documentation/hypervisor-interfaces.txt >

[PATCH v3 12/12] inmates: use halt() in demos

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- inmates/demos/arm/gic-demo.c | 3 +-- inmates/demos/x86/ioapic-demo.c | 3 +-- inmates/demos/x86/ivshmem-demo.c | 2 +- inmates/demos/x86/pci-demo.c | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git

[PATCH v3 06/12] inmates: implement stop()

2018-05-07 Thread Ralf Ramsauer
stop() disables all interrupts and enters halt(). Signed-off-by: Ralf Ramsauer --- inmates/lib/inmate_common.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/inmates/lib/inmate_common.h b/inmates/lib/inmate_common.h index 6c779b53..dfe33347 100644 ---

[PATCH v3 08/12] inmates: x86: move stop label to the top

2018-05-07 Thread Ralf Ramsauer
We will never return from c_entry. Make it clear on x86 by moving the stop label to the top of the assembly code. Signed-off-by: Ralf Ramsauer --- inmates/lib/x86/header-32.S | 11 +-- inmates/lib/x86/header.S| 11 +-- 2 files changed, 10

[PATCH v3 00/12] Revision communication region ABI

2018-05-07 Thread Ralf Ramsauer
Hi, ABI changes of the communication region can not be detected by inmates at the moment. Let's introduce some magic and revision field at the beginning of the page to signal ABI changes. This will help us if we change the ABI at a later point in time. Ralf since v2: - fix some indentation

[PATCH v3 07/12] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Ralf Ramsauer
Don't jump directly to inmate_main from assembly, jump to c_entry. At the moment, c_entry does nothing else than jumping to inmate_main and stop the machine if inmate_main returns. Later we can use c_entry to do platform independant setup/checks. Signed-off-by: Ralf Ramsauer

[PATCH v3 04/12] inmates: implement halt()

2018-05-07 Thread Ralf Ramsauer
We will enter this function if we hit unrecoverable state. Signed-off-by: Ralf Ramsauer --- inmates/lib/arm-common/include/inmate.h | 6 ++ inmates/lib/x86/inmate.h| 6 ++ 2 files changed, 12 insertions(+) diff --git

[PATCH v3 01/12] core: comm_region: Add magic and ABI revision to comm_region

2018-05-07 Thread Ralf Ramsauer
Changes to the ABI of the communication region might break inmates without noticing. Add the magic JHCOMM together with the ABI version as a preamble of the structure. Signed-off-by: Ralf Ramsauer --- hypervisor/control.c | 7 ++-

[PATCH v3 03/12] core, driver: add new cell state JAILHOUSE_CELL_FAILED_COMM_REV

2018-05-07 Thread Ralf Ramsauer
A cell may set this state if its internal ABI of the communication region is incompatibel to the one provided by the hypervisor. Signed-off-by: Ralf Ramsauer --- driver/sysfs.c| 2 ++ hypervisor/control.c | 1 +

[PATCH v3 09/12] inmates: implement memcmp

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- inmates/lib/inmate_common.h | 1 + inmates/lib/string.c| 10 ++ 2 files changed, 11 insertions(+) diff --git a/inmates/lib/inmate_common.h b/inmates/lib/inmate_common.h index dfe33347..ba39550e 100644 ---

[PATCH v3 02/12] Documentation: document new communication region fields

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- Documentation/hypervisor-interfaces.txt | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Documentation/hypervisor-interfaces.txt b/Documentation/hypervisor-interfaces.txt index

[PATCH v3 05/12] inmates: implement arch_disable_irqs()

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- inmates/lib/arm/include/arch/inmate.h | 5 + inmates/lib/arm64/include/arch/inmate.h | 5 + inmates/lib/x86/inmate.h| 5 + 3 files changed, 15 insertions(+) diff --git

[PATCH v3 10/12] configs: arm: add comm_region to all inmates

2018-05-07 Thread Ralf Ramsauer
comm_region will become mandatory for all of our inmates. On x86, we already use the communication region to pass certain platform specific information to guests. So let's do this on all ARM architectures as well. This patch is a preparation for that. Let's use guest paddr 0x8000 (2GiB) for

Re: [PATCH v2 07/11] inmates: x86: move stop label to the top

2018-05-07 Thread Jan Kiszka
On 2018-05-07 17:24, Ralf Ramsauer wrote: > We will never return from c_entry. Make it clear on x86 by moving the stop > label to the top of the assembly code. > > Signed-off-by: Ralf Ramsauer > --- > inmates/lib/x86/header-32.S | 9 - >

Re: [PATCH v2 10/11] inmates: check communication region ABI version

2018-05-07 Thread Jan Kiszka
On 2018-05-07 17:24, Ralf Ramsauer wrote: > Or fail by setting the cell's state and halt. > > Signed-off-by: Ralf Ramsauer > --- > inmates/lib/setup.c | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/inmates/lib/setup.c

Re: [PATCH v2 01/11] core: comm_region: Add magic and ABI revision to comm_region

2018-05-07 Thread Jan Kiszka
On 2018-05-07 17:24, Ralf Ramsauer wrote: > Changes to the ABI of the communication region might break inmates > without noticing. Add the magic JHCOMM together with the ABI version as > a preamble of the structure. > > Signed-off-by: Ralf Ramsauer > --- >

[PATCH v2 00/11] Revision communication region ABI

2018-05-07 Thread Ralf Ramsauer
Hi, ABI changes of the communication region can not be detected by inmates at the moment. Let's introduce some magic and revision field at the beginning of the page to signal ABI changes. This will help us if we change the ABI at a later point in time. Ralf since v1: - minor stylistic

[PATCH v2 05/11] inmates: implement stop()

2018-05-07 Thread Ralf Ramsauer
stop() disables all interrupts and enters halt(). Signed-off-by: Ralf Ramsauer --- inmates/lib/inmate_common.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/inmates/lib/inmate_common.h b/inmates/lib/inmate_common.h index 6c779b53..dfe33347 100644 ---

[PATCH v2 04/11] inmates: implement arch_disable_irqs()

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- inmates/lib/arm/include/arch/inmate.h | 5 + inmates/lib/arm64/include/arch/inmate.h | 5 + inmates/lib/x86/inmate.h| 5 + 3 files changed, 15 insertions(+) diff --git

[PATCH v2 06/11] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Ralf Ramsauer
Don't jump directly to inmate_main from assembly, jump to c_entry. At the moment, c_entry does nothing else than jumping to inmate_main and stop the machine if inmate_main returns. Later we can use c_entry to do platform independant setup/checks. Signed-off-by: Ralf Ramsauer

[PATCH v2 11/11] inmates: use halt() in demos

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- inmates/demos/arm/gic-demo.c | 3 +-- inmates/demos/x86/ioapic-demo.c | 3 +-- inmates/demos/x86/ivshmem-demo.c | 2 +- inmates/demos/x86/pci-demo.c | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git

[PATCH v2 07/11] inmates: x86: move stop label to the top

2018-05-07 Thread Ralf Ramsauer
We will never return from c_entry. Make it clear on x86 by moving the stop label to the top of the assembly code. Signed-off-by: Ralf Ramsauer --- inmates/lib/x86/header-32.S | 9 - inmates/lib/x86/header.S| 9 - 2 files changed, 8

[PATCH v2 01/11] core: comm_region: Add magic and ABI revision to comm_region

2018-05-07 Thread Ralf Ramsauer
Changes to the ABI of the communication region might break inmates without noticing. Add the magic JHCOMM together with the ABI version as a preamble of the structure. Signed-off-by: Ralf Ramsauer --- hypervisor/control.c | 7 ++-

[PATCH v2 03/11] inmates: implement halt()

2018-05-07 Thread Ralf Ramsauer
We will enter this function if we hit unrecoverable state. Signed-off-by: Ralf Ramsauer --- inmates/lib/arm-common/include/inmate.h | 6 ++ inmates/lib/x86/inmate.h| 6 ++ 2 files changed, 12 insertions(+) diff --git

[PATCH v2 02/11] core, driver: add new cell state JAILHOUSE_CELL_FAILED_COMM_REV

2018-05-07 Thread Ralf Ramsauer
A cell may set this state if its internal ABI of the communication region is incompatibel to the one provided by the hypervisor. Signed-off-by: Ralf Ramsauer --- driver/sysfs.c| 2 ++ hypervisor/control.c | 1 +

[PATCH v2 08/11] inmates: implement memcmp

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- inmates/lib/inmate_common.h | 1 + inmates/lib/string.c| 10 ++ 2 files changed, 11 insertions(+) diff --git a/inmates/lib/inmate_common.h b/inmates/lib/inmate_common.h index dfe33347..ba39550e 100644 ---

[PATCH v2 10/11] inmates: check communication region ABI version

2018-05-07 Thread Ralf Ramsauer
Or fail by setting the cell's state and halt. Signed-off-by: Ralf Ramsauer --- inmates/lib/setup.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/inmates/lib/setup.c b/inmates/lib/setup.c index 5af94fc8..87837741 100644 ---

[PATCH v2 09/11] configs: arm: add comm_region to all inmates

2018-05-07 Thread Ralf Ramsauer
comm_region will become mandatory for all of our inmates. On x86, we already use the communication region to pass certain platform specific information to guests. So let's do this on all ARM architectures as well. This patch is a preparation for that. Let's use guest paddr 0x8000 (2GiB) for

Re: [PATCH 7/7] inmates: check communication region ABI version

2018-05-07 Thread Jan Kiszka
On 2018-05-07 15:54, Ralf Ramsauer wrote: > On 05/07/2018 03:47 PM, Jan Kiszka wrote: >> On 2018-05-07 15:42, Ralf Ramsauer wrote: >>> On 05/07/2018 03:37 PM, Jan Kiszka wrote: On 2018-05-07 14:12, Ralf Ramsauer wrote: > Or fail by setting the cell's state and halt. > >

Re: [PATCH 4/7] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Jan Kiszka
On 2018-05-07 16:12, Ralf Ramsauer wrote: > On 05/07/2018 03:25 PM, Jan Kiszka wrote: >> On 2018-05-07 14:12, Ralf Ramsauer wrote: >>> Don't jump directly to inmate_main from assembly, jump to c_entry. >>> >>> At the moment, c_entry does nothing else than jumping to inmate_main and >>> ending up

Re: [PATCH 4/7] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Ralf Ramsauer
On 05/07/2018 03:25 PM, Jan Kiszka wrote: > On 2018-05-07 14:12, Ralf Ramsauer wrote: >> Don't jump directly to inmate_main from assembly, jump to c_entry. >> >> At the moment, c_entry does nothing else than jumping to inmate_main and >> ending up in an endless loop if inmate_main returns. >> >>

Re: [PATCH 4/7] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Jan Kiszka
On 2018-05-07 15:48, Ralf Ramsauer wrote: > On 05/07/2018 03:42 PM, Jan Kiszka wrote: >> On 2018-05-07 15:35, Ralf Ramsauer wrote: >>> On 05/07/2018 03:25 PM, Jan Kiszka wrote: On 2018-05-07 14:12, Ralf Ramsauer wrote: > Don't jump directly to inmate_main from assembly, jump to c_entry.

Re: Inter-cell communication on BPM1

2018-05-07 Thread Jan Kiszka
On 2018-05-07 15:48, Assila Belhouichet wrote: > Hi all, > > i reproduced the patchs that Henning provided for testing the intercell > communication on the bananapi, everything was okay until i executed the > command: > > --> jailhouse cell create bananapi-linux-demo.cell > > then i got this

Re: [PATCH 7/7] inmates: check communication region ABI version

2018-05-07 Thread Ralf Ramsauer
On 05/07/2018 03:47 PM, Jan Kiszka wrote: > On 2018-05-07 15:42, Ralf Ramsauer wrote: >> On 05/07/2018 03:37 PM, Jan Kiszka wrote: >>> On 2018-05-07 14:12, Ralf Ramsauer wrote: Or fail by setting the cell's state and halt. Signed-off-by: Ralf Ramsauer

Re: Inter-cell communication on BPM1

2018-05-07 Thread Assila Belhouichet
Hi all, i reproduced the patchs that Henning provided for testing the intercell communication on the bananapi, everything was okay until i executed the command: --> jailhouse cell create bananapi-linux-demo.cell then i got this error message: Adding virtual PCI device 00:00.0 to cell

Re: [PATCH 7/7] inmates: check communication region ABI version

2018-05-07 Thread Jan Kiszka
On 2018-05-07 15:42, Ralf Ramsauer wrote: > On 05/07/2018 03:37 PM, Jan Kiszka wrote: >> On 2018-05-07 14:12, Ralf Ramsauer wrote: >>> Or fail by setting the cell's state and halt. >>> >>> Signed-off-by: Ralf Ramsauer >>> --- >>> inmates/lib/setup.c | 11

Re: [PATCH 7/7] inmates: check communication region ABI version

2018-05-07 Thread Ralf Ramsauer
On 05/07/2018 03:37 PM, Jan Kiszka wrote: > On 2018-05-07 14:12, Ralf Ramsauer wrote: >> Or fail by setting the cell's state and halt. >> >> Signed-off-by: Ralf Ramsauer >> --- >> inmates/lib/setup.c | 11 +++ >> 1 file changed, 11 insertions(+) >> >>

Re: [PATCH 4/7] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Jan Kiszka
On 2018-05-07 15:35, Ralf Ramsauer wrote: > On 05/07/2018 03:25 PM, Jan Kiszka wrote: >> On 2018-05-07 14:12, Ralf Ramsauer wrote: >>> Don't jump directly to inmate_main from assembly, jump to c_entry. >>> >>> At the moment, c_entry does nothing else than jumping to inmate_main and >>> ending up

Re: [PATCH 7/7] inmates: check communication region ABI version

2018-05-07 Thread Jan Kiszka
On 2018-05-07 14:12, Ralf Ramsauer wrote: > Or fail by setting the cell's state and halt. > > Signed-off-by: Ralf Ramsauer > --- > inmates/lib/setup.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/inmates/lib/setup.c

Re: [PATCH 4/7] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Ralf Ramsauer
On 05/07/2018 03:25 PM, Jan Kiszka wrote: > On 2018-05-07 14:12, Ralf Ramsauer wrote: >> Don't jump directly to inmate_main from assembly, jump to c_entry. >> >> At the moment, c_entry does nothing else than jumping to inmate_main and >> ending up in an endless loop if inmate_main returns. >> >>

Re: [PATCH 3/7] inmates: implement spin_forever()

2018-05-07 Thread Ralf Ramsauer
On 05/07/2018 03:20 PM, Jan Kiszka wrote: > On 2018-05-07 14:12, Ralf Ramsauer wrote: >> We will enter this function if we hit unrecoverable state. >> >> Signed-off-by: Ralf Ramsauer >> --- >> inmates/lib/arm-common/include/inmate.h | 6 ++ >>

Re: [PATCH 4/7] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Jan Kiszka
On 2018-05-07 14:12, Ralf Ramsauer wrote: > Don't jump directly to inmate_main from assembly, jump to c_entry. > > At the moment, c_entry does nothing else than jumping to inmate_main and > ending up in an endless loop if inmate_main returns. > > Later we can use c_entry to do platform

Re: [PATCH 3/7] inmates: implement spin_forever()

2018-05-07 Thread Jan Kiszka
On 2018-05-07 14:12, Ralf Ramsauer wrote: > We will enter this function if we hit unrecoverable state. > > Signed-off-by: Ralf Ramsauer > --- > inmates/lib/arm-common/include/inmate.h | 6 ++ > inmates/lib/x86/inmate.h| 6 ++ > 2 files

Re: [PATCH 2/7] core, driver: add new cell state JAILHOUSE_CELL_FAILED_COMM_REV

2018-05-07 Thread Jan Kiszka
On 2018-05-07 14:12, Ralf Ramsauer wrote: > A cell may set this state if its internal ABI of the communication > region is incompatibel to the one provided by the hypervisor. > > Signed-off-by: Ralf Ramsauer > --- > driver/sysfs.c| 2 ++ >

[PATCH 3/7] inmates: implement spin_forever()

2018-05-07 Thread Ralf Ramsauer
We will enter this function if we hit unrecoverable state. Signed-off-by: Ralf Ramsauer --- inmates/lib/arm-common/include/inmate.h | 6 ++ inmates/lib/x86/inmate.h| 6 ++ 2 files changed, 12 insertions(+) diff --git

[PATCH 0/7] Revision communication region ABI

2018-05-07 Thread Ralf Ramsauer
Hi, ABI changes of the communication region can not be detected by inmates at the moment. Let's introduce some magic and revision field at the beginning of the page to signal ABI changes. This will help us if we change the ABI at a later point in time. Ralf Ralf Ramsauer (7): core:

[PATCH 5/7] inmates: implement memcmp

2018-05-07 Thread Ralf Ramsauer
Signed-off-by: Ralf Ramsauer --- inmates/lib/inmate_common.h | 1 + inmates/lib/string.c| 10 ++ 2 files changed, 11 insertions(+) diff --git a/inmates/lib/inmate_common.h b/inmates/lib/inmate_common.h index 6c779b53..8d1c53e5 100644 ---

[PATCH 1/7] core: comm_region: Add magic and ABI revision to comm_region

2018-05-07 Thread Ralf Ramsauer
Changes to the ABI of the communication region might break inmates without noticing. Add the magic JHCOMM together with the ABI version as a preamble of the structure. Signed-off-by: Ralf Ramsauer --- hypervisor/control.c | 7 ++-

[PATCH 2/7] core, driver: add new cell state JAILHOUSE_CELL_FAILED_COMM_REV

2018-05-07 Thread Ralf Ramsauer
A cell may set this state if its internal ABI of the communication region is incompatibel to the one provided by the hypervisor. Signed-off-by: Ralf Ramsauer --- driver/sysfs.c| 2 ++ hypervisor/control.c | 1 +

[PATCH 7/7] inmates: check communication region ABI version

2018-05-07 Thread Ralf Ramsauer
Or fail by setting the cell's state and halt. Signed-off-by: Ralf Ramsauer --- inmates/lib/setup.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/inmates/lib/setup.c b/inmates/lib/setup.c index ed35b6f8..be651696 100644 ---

[PATCH 4/7] inmates: add intermediate c_entry trampoline

2018-05-07 Thread Ralf Ramsauer
Don't jump directly to inmate_main from assembly, jump to c_entry. At the moment, c_entry does nothing else than jumping to inmate_main and ending up in an endless loop if inmate_main returns. Later we can use c_entry to do platform independant setup/checks. Signed-off-by: Ralf Ramsauer

[siemens/jailhouse] 97df80: x86: mmio, inmates/tests: Add support for movb-fro...

2018-05-07 Thread GitHub
Branch: refs/heads/next Home: https://github.com/siemens/jailhouse Commit: 97df80071a5392b958504084a992c6264c380716 https://github.com/siemens/jailhouse/commit/97df80071a5392b958504084a992c6264c380716 Author: Jan Kiszka Date: 2018-05-06 (Sun, 06 May

[PATCH 1/5] x86: mmio, inmates/tests: Add support for movb-from-mem

2018-05-07 Thread Jan Kiszka
From: Jan Kiszka We already support movb-to-mem, adding the reverse direction is simple. Accompany this with tests for both 8-bit accesses. Signed-off-by: Jan Kiszka --- hypervisor/arch/x86/include/asm/processor.h | 1 +

[PATCH 3/5] x86: Fix long mode detection

2018-05-07 Thread Jan Kiszka
From: Jan Kiszka If the guest is currently running in long mode does not only depend on EFER having it enabled. We also need to check if CS.L is set. If L is 0, we are actually in compatibility mode. Rework vcpu_vendor_get_cs() to vcpu_vendor_get_cs_attr() so that it

[PATCH 5/5] inmates: tests: Add x86-32 MMIO test case

2018-05-07 Thread Jan Kiszka
From: Jan Kiszka Mostly the 32-bit equivalent of the existing 64-bit case, just removing long-mode-only tests and converting to 32-bit data/address size where needed. Signed-off-by: Jan Kiszka --- inmates/tests/x86/Makefile | 5 +-

[PATCH 4/5] x86: mmio: Fix address width calculation

2018-05-07 Thread Jan Kiszka
From: Jan Kiszka As we are claiming to support the affected instructions, we should get this completely right: When not in long mode, the combination of the address-size prefix and the D/B bit from CS defines if we are using 16 or 32 bit addresses. A similar pattern may

Re: Configuring more than one vPCI device for ivshmem interrupts

2018-05-07 Thread Jan Kiszka
On 2018-05-04 22:56, Giovani Gracioli wrote: > Thanks Jan. > > By changing the bar_mask and having the two vpci devices mapped in different > pages, I was able to run it. > > Can you please explain how the bar mask is used to define the address in > which the device is mapped to? That's